{"level":"error","ts":"2026-10-29T22:15:32.701Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:15:32.907Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w0-e4e24e","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:55:29Z","generation":24,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"0116fcec-303a-43b0-a502-7899376d3c04\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:14:00Z"}],"name":"kuadrant-e2e-worker-w0-e4e24e","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w0-e4e24e","uid":"0116fcec-303a-43b0-a502-7899376d3c04"}],"resourceVersion":"79243","uid":"b943d1f3-601a-492d-b96c-1ef8c4a2575b"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d480b9beb18c8fa3fe0505aacaac5a411341ec81a2f23d0c3e1ad89b3a2cd75c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8c1bebdc7f15f8d83590b148593afe94b62e906d8e5837204a1314531ab908a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b83343636da550ed571b74c5049f2b8e3193d8a92fa2901a7230db257f9bd68\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85b18e8d5d32d3e585dac03648661892e776c82568e93750a1f4720875df8eba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e13b925913c7bca5becb19f97f136863c723b36e1f2db3d7ebdd1677226d88c3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a99719d94c1552cd6ee8f1e43c4da97aec9e1424383e4c1beb77abf9ce6df2a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f224bca70d6402a07bd2021c1c6c5bef033176c6a0d8e803f3eea7f0a508464e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40ce5391fd99bedeb11de3555b9f40ce6006bf4348fc61b933be22332d0286b5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1330c75439a06179f890f4dcf740f739b35c4e436c80760f1c17abc6588c28f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c1d97617322fb1197c7aa56bd8b19f6e5d421f7b997d1703ce13b542191735a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7939e9cfcf6a05baec046d207b76d0dd23b65dc90ce109c7f4087a9663f0d081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5102db6f8423d28bbce14930cbda7d4ac6ca578d77b3d7160c40541e31f53a13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9399f826c33a6c95cac8e1a50e46e94f38dcaaf9d47ffa474cc5c82ea48f7c9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c113bdd397ba22c70dbbd81bd31791ac01f4f2e08fd11b1e93c9316f34e7262e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3daf663b9ba2c2ba1d883d94f83415db07ed697237a8dfeb3d30fbd9ed625590\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"435d1731c45b4678203451a9af5748845556fb2a43d2dd1d944b9b8c58a84fb6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00a75861f8970bccdd122c866d53272ba17f6a7aaa968b46f3beb6eb06bcbe23\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"71895772f26079da1c5651c803858dd8ae8ef896fdfa830f66d7802132314853\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69bb7f86c92c89b97d78d8bbbb5fd8831f641c359abe72d3ea04601907f78592\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b01c1264b0855fb840933d1fb1a24d254a64506a8711d8e99196341cfbfbb2e0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86064e56537ee0cce50a3a12a81a0f16cfbc935c55f539f1a914e570d63105f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8d0529c1be1e17ea8bb2dbc1d0fcf4545305b8383a3079bc7d955bcdeb2bad64\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f88dea7e5d55db1413db268853f3106baeb4dabbe9b3b71208f85c62ca3d21e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d6a1805d5418407c3c8b908d10c23768f141a5ea0d72a3417ddd2b734a03c6c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2aa7282b85b24e8d9a3c3155f50686292d4c3f88a2a6e1ceb7c671692999a3f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e12e4d97c90f4d0df7527872714bb768e5abb5a01e20ea24f81de7f47d284939\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f0f3bc361a04aaf9b5c119ceb7bf62f501b86ca79c7fed4e37c4520bddcfa55f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8421f77f149d248e6447ff29746ac629dbeddce9085002cb9b61c5cf4a1b2169\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"15eb3a86fd6a21f46c21bf8d54be1c074df98ce59b517dd3b7bfa2a128e946d2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac6884fb8cf6e96843cd52d51fd3b44e3d7d7db1eab6e40fe00b565d2c239ca6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d0f2ec4230c15dade151cb7dc5b8ac414c5c24c508f1a95c3623cfaf606fdbaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1a6aa065d98327c50a5386bd25f2de51362978298faa785425da271c7f4f15f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bdc2e96aabc973b2029c0fd7aec1ee017ffe9b8e15c7497f1cb9f51498039360\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9103232f8c44a022206eb10ae2e9cc352aa8ecc3332eee9369abf9c711ea6f37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c30318c3a7386471e5bf619704bd51fc793ba1bbb6bc013a9d7873e8ccc446\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66deff1214054123706313008c095511b72ae7995876f8d3bed83699b3adc192\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"db9d62d63b1e388f7fd66c7cd75448506e93882ba51ceebe7b80e278277d0aa5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eb848ec115930b247db449b5c295921cec0f22e6bb0c1aa47b2b2635e6952c2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"427c7d6471c7aec70ebe5161578e2596aa4ef4dd85df31266fb9f11a30600387\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a62c63da2e913ea1e067edf0ec8e7387b140d652781ba7cbc0d362e9aba6e4e7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ddf318b919b105619e46bf904423d181a2ef34319a5e1db639a50b080f02078\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"481247ad09b48a44bde9c7d5d699d58a8b94d83a30d95acb25bbe5faaacdc563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ae5b28785f1440be764694d3e0a349beb963be6d432e433dbfbfc8070c13363c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce3a13319837209228d241399c060c2543d4ce58facc84a04667b094a2e40405\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c880a43986014fc25d342f14a7d9c70ec77f6b5e3550d63c82f14d780ba07932\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1311b36313b568aed94b49c3968746c03bd11b7459a9f02d9cf09626acbc1a78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39d944171459f0ec19ed4f0ce06fc277b2ec924ed4db5b69ba06e9dd3984baf3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9b43ef07194da2109d596f32507d9110d7868ef0799ca587aff4cb71e2d5138d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"55d80188ac8522e7d769229cf8073754984a36490160b74e2bb0458e07b7b35b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c3cf9ed8fe5a1c8b72e54b00144d6c15dcc0761448350ce6d95b9abb4c14b3a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a950b10f26d06f2c625b4511aea662e4272b9178fd5fcd8db05216c777f941a3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c210ebef3ff5124f4a77ead0c45652e2002e6d235ae21dc8bba61909ea945a86\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"35219ce6ba20795cf219a688938f5373f4e3aeffec7fe8dc7796ed1258909c7a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d13104e357d991127f5cf34676076ad54e486fc6a01fab7c87bc97f8913622a3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b794b620ca601ac0c3b3e71a4f3d62a0547dcad0165e7047e2b9b906d9ea8a9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3e3f6af874f8154f6d8e0e3878f3be5f349eb3be00adebd9004de6eb705c4be7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2121c534853d6f7363893203f31ab196120a0d433ede618a1191ae8eb2c975bd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3076174c84a16f6e631e3318c9531bae04779d4d8442b8aca673d9a85179e1c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"48fb1f1f7e8a31c60a0f092342fe060b86761469a0deebc46aab54455f37466c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a050fd03a027fd349b778ea9e91ca6f1ca74623aa5f0f8bbfeef0c6d622e2714\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"575ff922b061abf742607edfad20fe318014e8e99eaa0f84f03be9ad7c4115f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"da14972c0d417381ab8ec6f577b26db941275362100fe4edb68272ce2e360ebb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a102ce1dddfc6d27fd2eff17bb4d62d35cb29520ef77e443b66236fc649d9f12\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8eab5d0b665e03ce70acae2e2339c65e9f1e23b7e3bde8d6de7c9f24701d5bc7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c41d37c9b0d18f7b7dbfec06f0d9d12ce3908a8103ecf5b0ab83df3a0e20db7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b6a6386d6588ee16a42f3e53679a6b7efe753ac79336c501323e29c56f3f98c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"83502380708d917b31a397c9dfbc7d821e46c0f21d4c8664d1a6d1c75f523ee8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"239b2f60b5be64cc02348a1a68d8a3af81f6b4355a67303193187a9e382d7bcb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"185bc1264b0eb74d2c1a5bfafab79f3376c19533a592d6fa3d6803848bb27b3f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5296d7a08f6a82fb89104505e2cd8f540cce05b351586e02935921cb5420e754\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cb0c713696ac20325aa32d5c8c207b8f056b61ef05470dbe762b0aa5df9a9960\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"49eea097e698ff73eae5fe8faeb99821463d0814abbfdf7251e21174951a9f21\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9fffc2f9e96b027562670d111b713d0abe587fbed8be0f46d620cb1f97528de1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1128a03a541f3afadbacd824f0d4e4c7f3e1c6ae0e098438ca611ff0fee09255\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"66a77dd4bac0078909121b75025e37981fc3f89fa23a1ba2cae738083efe010c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e231a62a0969b02f0a400d70aa457924abff51bf51a554fa3d59f7da6b8aa2df\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e11de9c48b72b7de689daaab7634a95522fd7795cff903ea09003f64b0cdffce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8a4327bb946bde96624eac665d5d8a2def6324608138fdf28af2406929c7f8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"52109a3b67859b16ffff4a23cb0983553e7724af6d65530d61809f07bccf8819\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3d8c67551230e314e32cbc29eb4c423b1f98d67cd981c728bfd646d6ae120dc3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"399586451f217d64fcd342acc3bdfbc97ac44101b69d365c61f311a9feb29d2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9040b1da45874a5f050fc63cf9f254354e6d7fdf075b6d8713e4ad64bd4c8379\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e8dd3a38614c20d4d89140d4d57d0cc022e5321a1e18c1a1845ef1f55b7201e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e90e7df76c4e092d5ecd6e4f81482ec5671566c295308df9edda61bf5e5dfffb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"027ab0a7df3e303ec00da28937b0dd8b2c4faed661ad6be8b39b628521dbd999\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fd70497262920e0e404f5b92ea572aa7f26f549930e10c8e8c343d1717b77319\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"32deb7e483cf5ffc896a7346b1b5ce838c9be3b543493d0e0aa6a8cc8df30bb7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b6841b10dd681e73d8a601294bb5d8f6341f73c8e9dc08f1745afd392f11db25\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47435d5eb106469ee5cff897b5b2bc61d5d10867f93c774e5f0f94a7dd262584\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fd075e1ba5d01c042f4778edc9f7fe51d6beaf0a757d76a03b22b38ae3c5d4da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"61c08f9ab2147ce976203b54b9cb06c561e68b1959649231da3755160780ec83\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"133d23374343f8f96371740a188eecdeb0f8f51ee762196bebb3f84fe5d0a811\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4a9d57725eae477f790bf6594150178b95e0923dc52c1a52721292e3dec4703\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca57a8e36bcc0d7f669489ae60897925262e027dd607958bc591dee50b733509\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"917e979850acd924c991573f00bed09c3047c31a2a316fea30cf3354a99041df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aadf2293fdcbeae8bbeafed7faaa57d587b76f7b03f0c0249e2b4b3e83a4b1bf\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8f36e348c018500f41e8636904cf3734e246d91e59fa165eb20a1d9e35e4c47a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32a0d8c74f999a4b08569031b0a5b47d0e58159466d75ccff538870c86330ab4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"017a85571c908979cdbeef29adf1bb8a2a1f1ef1f083e563219d7c03f3eb8d4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1b9d52adf1079c890c90f233b15614193f2bcae653adb6cb1e7c7c07b008ad27\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"905cae9b048d87e40ad31ad18298d257ac964badb7d113dbcd5e3a44b01b29e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8715d4d70722c20f0e362dc9f8fcf066fded21b84d78db60763741e72dcc13dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4206079d7076c7dfdc8abbd4d64aab112b817ef914f51aebb64934b22df26478\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0d04052bebacc12f54b85011786f08195965e78c6b5d8bff0e73f1d0404d362c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3ce9221135ad27d665fddcf73cf7b1558268a0f614e6b53656e30806f77961c5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50e8aa9fe344f7c3490a1ed553a1769ce734dc41e39409e7a1c3ed1cf179ea21\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"70a52b28327b194e2b6249cccb31fdcf4ad338c781f5e2366c4a3663fb215252\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1a9be90cc24146d0d73c7b019a1ddd84d58999729e1529decf75baea32d297f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b7d1822a310fc2910328107d39044853f155832564c8fc4643fed60426d550b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32024225c59d24e00146ec21a76559925f5a8a9db6d4e13cfc227f84ba63b07a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"968d66a9c787ed153fe19114a1888b80fec5241e17c1fc54a04bcf8c60e3cf3a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c6986886e9473a752dd323ab0a3046f3d01b09ec23fb8053643dada94906645\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"04ba99ecc4e62c02427f971bb461e7debf35a9a8a245a80a6a9fcc134728d389\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6f4428370f44d38ad4e35102f8842fd41e0269a65eda85f5c19ebfd3346e2b21\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"535f9d55a1a594c66bbdd1038837acba558cc51e60c0a89a0c748b159862f132\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dbf622082082b183ca4f65f4f70a2b0ce5a8f03e280a0cb54344b0933a113632\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7ab8da2a2ecd9a592495721652efd36bfe54d7d19c958119961f8adec13e337c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f8bf236d41de806dcedcc22574014a991548eeb51e79b0c74cb2b1449572fe62\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f8c5632bc9752d033dbac2d616c8a4493dc391eaffc9bd310c2a422b6161e030\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bd9517cae214617f26e6bf71c0b998a6f09c6efb2cb8c1c94d8c2dc86a2edca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7733eaf2eadd19f412bf8a6c700b7a4d4b44bda848309a237ae5017d01302bef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0d4e711e9bd89cae2bbc12ec3a7258f9e91e253903da8fff30502176f400619b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8cc7a30aa77abc91a482733f74ec7bafc36c51a721af970a3b17a933f8b54a0a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d596ff82f181f43a63e699ad3277e801616005f09a12e314d2255f374c6d450d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6af02a4ee5ac729219d49dcf6d2ea845d076d0e0f7f5f55bb8fc6264692e1e23\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"84c4406d47c6090585224f220e5cb71639233473ccc0c6eab1e5b2afb90ac645\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b0fb2d7de7b623b50aae5b99c069782d16fec7bacfbcc2e713bdaa2852f2cf3b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w0-e4e24e\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"029b4d0dc4762b73da67a7dd5bbf440569610a0fce0903e4cefb90971906f176\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e054dba7bc9e389b571a4325b747e894c53d29f356096d816cf8a0199aff1a32\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/simulator-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__5cf06d7a\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"4919222895f22569\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__5cf06d7a != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-simulator-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a290426e8e4832d404e627c3712fe09bac2cfa95f1dc217b383a702a45c72038\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/simulator-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7868b28c81eab5ff593f488c0b7acc1f942c1ab665ad51128a7c55bf9d696c27\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/premium-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__cce261c7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"ac3fcf18dd7b0506\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__cce261c7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w0-e4e24e/maas-trlp-premium-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b3feb37cead763154a8671f7fd7e2d376e605e29005dd342a26fc1d2bd4be\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/premium-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8751c6a5253a6f8a379e743f26b7fb8f4b3afc9a0037a710f2aedb01f691d9b2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"375ad95fc10fe6143a7693c6a6cd3dbb95f9e2b70a178ab10f2b0e08e5cc870f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-w0-e4e24e\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d6d101baf2e59fcff11c2dc33c8f4073327d8305ca0fa673a7d6a2504afc3b8a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w0-e4e24e-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w0-e4e24e/distinct-2-w0-e4e24e-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__9c929eb7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__9c929eb7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w0-e4e24e\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b75a08bbf38aa8a28143107ef2cdae71f2fc70a9369bcf2b5d26bc225109559f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w0-e4e24e/models/e2e/distinct-2-w0-e4e24e\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w0-e4e24e"}}},"status":{}},"error":"envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w0-e4e24e\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.248Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny-e2e-worker-w0-e4e24e","namespace":"openshift-ingress","uid":"91cae527-8195-48a6-9959-eb1b40b324eb","error":"tokenratelimitpolicies.kuadrant.io \"gateway-default-deny-e2e-worker-w0-e4e24e\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.253Z","logger":"kuadrant-operator.AuthPolicyStatusUpdater","msg":"unable to update status for authpolicy","name":"e2e-worker-w0-e4e24e-maas-auth","namespace":"openshift-ingress","error":"authpolicies.kuadrant.io \"e2e-worker-w0-e4e24e-maas-auth\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.370Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-simulator-w0-e4e24e","namespace":"e2e-models-e2e-worker-w0-e4e24e","uid":"4a40de2f-c9e3-4108-b2d0-20172b917aec","error":"tokenratelimitpolicies.kuadrant.io \"maas-trlp-simulator-w0-e4e24e\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.384Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-premium-w0-e4e24e","namespace":"e2e-models-e2e-worker-w0-e4e24e","uid":"befbbe30-87b2-4c11-aa2b-4ae87baeebe1","error":"tokenratelimitpolicies.kuadrant.io \"maas-trlp-premium-w0-e4e24e\" not found"} {"level":"info","ts":"2026-10-29T22:15:34.407Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:34.407Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:34.424Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-a-f363a3","error":"Operation cannot be fulfilled on gateways.gateway.networking.k8s.io \"e2e-ipp-a-f363a3\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:34.494Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"ipp-route-f363a3-kserve-route","namespace":"ai-tenant-e2e-ipp-a-f363a3","error":"httproutes.gateway.networking.k8s.io \"ipp-route-f363a3-kserve-route\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.554Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-worker-w0-e4e24e","error":"gateways.gateway.networking.k8s.io \"e2e-worker-w0-e4e24e\" not found"} {"level":"error","ts":"2026-10-29T22:15:34.554Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"max retry attempts reached, giving up","source":"AuthPolicyStatusUpdater","operation":"update","resource":"openshift-ingress/e2e-worker-w0-e4e24e-maas-auth","kind":"AuthPolicy.kuadrant.io","attempts":5,"duration":28.599474463,"error":"authpolicies.kuadrant.io \"e2e-worker-w0-e4e24e-maas-auth\" not found"} {"level":"info","ts":"2026-10-29T22:15:34.554Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":5,"requeueAfter":32} {"level":"info","ts":"2026-10-29T22:15:36.339Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["HTTPRoute","EnvoyFilter","AuthConfig","Gateway","TokenRateLimitPolicy","AuthPolicy","Limitador","ConfigMap","Kuadrant"],"eventTypes":{"create":19,"delete":48,"update":19}} {"level":"info","ts":"2026-10-29T22:15:36.377Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:36.389Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:36.834Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:36.886Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:36.994Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:36.994Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:36.994Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:37.417Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:37.425Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:37.428Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:15:37.432Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:37.432Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:37.484Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:37.486Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:38.314Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:38.981Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:38.981Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"max retry attempts reached, giving up","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","attempts":5,"duration":26.973858916,"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"Limitador.limitador.kuadrant.io/kuadrant-system/limitador/update","attempts":5,"duration":26.973877205} {"level":"info","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-ipp-b-a9e67f/update","attempts":5,"duration":26.973873116} {"level":"info","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":5,"duration":26.973873944} {"level":"info","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w0-e4e24e/update","attempts":5,"duration":26.973889662} {"level":"info","ts":"2026-10-29T22:15:39.130Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"all non-blocking errors have exceeded max retry attempts","errorCount":0} {"level":"info","ts":"2026-10-29T22:15:39.213Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["AuthPolicy","EnvoyFilter","AuthConfig","HTTPRoute","Gateway","ConfigMap","TokenRateLimitPolicy","Limitador","Kuadrant"],"eventTypes":{"create":55,"delete":142,"update":50}} {"level":"info","ts":"2026-10-29T22:15:39.268Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:39.289Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:39.916Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:39.951Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:40.043Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:40.115Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:40.115Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:40.900Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:40.902Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:40.902Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:40.917Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:40.919Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:40.919Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"error","ts":"2026-10-29T22:15:40.937Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:40.937Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:41.361Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":20,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"82619","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:41.422Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-ipp-b-a9e67f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T22:10:06Z","generation":5,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-ipp-b-a9e67f","uid":"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095"}],"resourceVersion":"82628","uid":"6a2c69ec-99c9-4a0e-b9f6-4313af813fe9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc6b3a1af39e247d103b7061d12b9c4861f3d712f0938408049f6236e0e0b3cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bb1d6d6f3863460dc83909698c93b7220a92894452d19d6457af7be325a88019\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbf671582bae71ec578375d9ef9f8b29035b4686fc4b8ca3ac8a8bc9e42b321c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e5c0bcc6617f9bd1d4a2924298593300a16b3e6b47e3752f5ad97dce8a033a6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6d9c4826f98b96291b3e533bf72b9eed275bea914efc558e9d04bd8b0ae7ab0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6900f9645f0469b317b2c08d9c86e7f681c67d6a9875de81f84f5af4dddd7c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0fb7c63d78749b052bfc800aa584bfafb95ca68ccb630d7b8bd23c238c4fad2b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"114f889ceadc55340a4307ffc072af09375d86d490473527870ee4f710f22d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e61cc9fcc076284d8c9d0419b5b775425a3e0bb0e7e53eb7a6037a0bcb43651b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81fd8909dd195c90b25833be49ad38f62551ab9057ea9e0162d69abdb827ac34\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2fdd2200466c681f7e5edf0b3426707d815879f21992a63ab089bd860cbc7976\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f99474b746a2b1df024fe9b470c2c7b2c02a84e3e8ce1692a86d7c9e07176328\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-ipp-b-a9e67f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:42.065Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:42.244Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:42.244Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:42.284Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-a-f363a3","error":"gateways.gateway.networking.k8s.io \"e2e-ipp-a-f363a3\" not found"} {"level":"info","ts":"2026-10-29T22:15:42.375Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"LimitadorLimitsReconciler","operation":"update","resource":"kuadrant-system/limitador","kind":"Limitador.limitador.kuadrant.io","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:42.375Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:42.375Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-ipp-b-a9e67f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:42.375Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:42.375Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":4,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:15:42.423Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["AuthPolicy","EnvoyFilter","Gateway","Limitador","AuthConfig","TokenRateLimitPolicy","HTTPRoute","Kuadrant","ConfigMap"],"eventTypes":{"create":23,"delete":44,"update":49}} {"level":"info","ts":"2026-10-29T22:15:42.475Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:42.495Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:42.993Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:43.012Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:43.124Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:43.125Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:43.125Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:43.431Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:43.484Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:43.488Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:15:43.494Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:43.494Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:43.503Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:15:43.527Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:43.527Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:44.216Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:15:44.267Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-ipp-b-a9e67f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T22:10:06Z","generation":5,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-ipp-b-a9e67f","uid":"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095"}],"resourceVersion":"82628","uid":"6a2c69ec-99c9-4a0e-b9f6-4313af813fe9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc6b3a1af39e247d103b7061d12b9c4861f3d712f0938408049f6236e0e0b3cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bb1d6d6f3863460dc83909698c93b7220a92894452d19d6457af7be325a88019\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbf671582bae71ec578375d9ef9f8b29035b4686fc4b8ca3ac8a8bc9e42b321c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e5c0bcc6617f9bd1d4a2924298593300a16b3e6b47e3752f5ad97dce8a033a6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6d9c4826f98b96291b3e533bf72b9eed275bea914efc558e9d04bd8b0ae7ab0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6900f9645f0469b317b2c08d9c86e7f681c67d6a9875de81f84f5af4dddd7c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0fb7c63d78749b052bfc800aa584bfafb95ca68ccb630d7b8bd23c238c4fad2b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"114f889ceadc55340a4307ffc072af09375d86d490473527870ee4f710f22d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e61cc9fcc076284d8c9d0419b5b775425a3e0bb0e7e53eb7a6037a0bcb43651b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81fd8909dd195c90b25833be49ad38f62551ab9057ea9e0162d69abdb827ac34\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2fdd2200466c681f7e5edf0b3426707d815879f21992a63ab089bd860cbc7976\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f99474b746a2b1df024fe9b470c2c7b2c02a84e3e8ce1692a86d7c9e07176328\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-ipp-b-a9e67f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:44.376Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":4} {"level":"error","ts":"2026-10-29T22:15:44.511Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":20,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"82619","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:44.690Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:44.690Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:44.769Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-a-f363a3","error":"gateways.gateway.networking.k8s.io \"e2e-ipp-a-f363a3\" not found"} {"level":"info","ts":"2026-10-29T22:15:44.815Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":4,"requeueAfter":4} {"level":"info","ts":"2026-10-29T22:15:44.867Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["Gateway","HTTPRoute","EnvoyFilter","AuthConfig","AuthPolicy","Limitador","TokenRateLimitPolicy","Kuadrant","ConfigMap"],"eventTypes":{"create":43,"delete":50,"update":40}} {"level":"info","ts":"2026-10-29T22:15:44.905Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:44.917Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:45.406Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:45.485Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:45.485Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:45.485Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:45.502Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:45.845Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:45.848Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:45.848Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:45.884Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:45.885Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:45.887Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"error","ts":"2026-10-29T22:15:45.904Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:45.905Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:46.342Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-ipp-b-a9e67f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T22:10:06Z","generation":5,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-ipp-b-a9e67f","uid":"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095"}],"resourceVersion":"82628","uid":"6a2c69ec-99c9-4a0e-b9f6-4313af813fe9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc6b3a1af39e247d103b7061d12b9c4861f3d712f0938408049f6236e0e0b3cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bb1d6d6f3863460dc83909698c93b7220a92894452d19d6457af7be325a88019\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbf671582bae71ec578375d9ef9f8b29035b4686fc4b8ca3ac8a8bc9e42b321c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e5c0bcc6617f9bd1d4a2924298593300a16b3e6b47e3752f5ad97dce8a033a6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6d9c4826f98b96291b3e533bf72b9eed275bea914efc558e9d04bd8b0ae7ab0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6900f9645f0469b317b2c08d9c86e7f681c67d6a9875de81f84f5af4dddd7c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0fb7c63d78749b052bfc800aa584bfafb95ca68ccb630d7b8bd23c238c4fad2b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"114f889ceadc55340a4307ffc072af09375d86d490473527870ee4f710f22d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e61cc9fcc076284d8c9d0419b5b775425a3e0bb0e7e53eb7a6037a0bcb43651b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81fd8909dd195c90b25833be49ad38f62551ab9057ea9e0162d69abdb827ac34\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2fdd2200466c681f7e5edf0b3426707d815879f21992a63ab089bd860cbc7976\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f99474b746a2b1df024fe9b470c2c7b2c02a84e3e8ce1692a86d7c9e07176328\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-ipp-b-a9e67f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:46.874Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:15:47.132Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":20,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"82619","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:47.266Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:47.266Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:47.305Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-a-f363a3","error":"gateways.gateway.networking.k8s.io \"e2e-ipp-a-f363a3\" not found"} {"level":"info","ts":"2026-10-29T22:15:47.434Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":4,"requeueAfter":8} {"level":"info","ts":"2026-10-29T22:15:47.519Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["Kuadrant","ConfigMap","EnvoyFilter","Gateway","Limitador","AuthConfig","AuthPolicy","HTTPRoute","TokenRateLimitPolicy"],"eventTypes":{"delete":209,"update":6}} {"level":"info","ts":"2026-10-29T22:15:47.584Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:47.598Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:47.991Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:48.012Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:48.012Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:48.014Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:48.131Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:48.521Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:48.534Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:48.586Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:48.586Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:48.586Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:15:48.591Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:15:48.601Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:48.601Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:49.213Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:15:49.534Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":20,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"82619","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:49.579Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-ipp-b-a9e67f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T22:10:06Z","generation":5,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:00Z"}],"name":"kuadrant-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-ipp-b-a9e67f","uid":"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095"}],"resourceVersion":"82628","uid":"6a2c69ec-99c9-4a0e-b9f6-4313af813fe9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc6b3a1af39e247d103b7061d12b9c4861f3d712f0938408049f6236e0e0b3cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bb1d6d6f3863460dc83909698c93b7220a92894452d19d6457af7be325a88019\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbf671582bae71ec578375d9ef9f8b29035b4686fc4b8ca3ac8a8bc9e42b321c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e5c0bcc6617f9bd1d4a2924298593300a16b3e6b47e3752f5ad97dce8a033a6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6d9c4826f98b96291b3e533bf72b9eed275bea914efc558e9d04bd8b0ae7ab0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6900f9645f0469b317b2c08d9c86e7f681c67d6a9875de81f84f5af4dddd7c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0fb7c63d78749b052bfc800aa584bfafb95ca68ccb630d7b8bd23c238c4fad2b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"114f889ceadc55340a4307ffc072af09375d86d490473527870ee4f710f22d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e61cc9fcc076284d8c9d0419b5b775425a3e0bb0e7e53eb7a6037a0bcb43651b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81fd8909dd195c90b25833be49ad38f62551ab9057ea9e0162d69abdb827ac34\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2fdd2200466c681f7e5edf0b3426707d815879f21992a63ab089bd860cbc7976\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f99474b746a2b1df024fe9b470c2c7b2c02a84e3e8ce1692a86d7c9e07176328\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-ipp-b-a9e67f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:49.706Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:49.706Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:49.786Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-a-f363a3","error":"gateways.gateway.networking.k8s.io \"e2e-ipp-a-f363a3\" not found"} {"level":"info","ts":"2026-10-29T22:15:49.830Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":4,"requeueAfter":16} {"level":"info","ts":"2026-10-29T22:15:51.296Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["AuthPolicy","EnvoyFilter","AuthConfig","HTTPRoute","Gateway","ConfigMap","TokenRateLimitPolicy","Limitador","Kuadrant"],"eventTypes":{"create":55,"delete":142,"update":50}} {"level":"info","ts":"2026-10-29T22:15:51.358Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:51.384Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:51.788Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:51.801Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:51.806Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:51.814Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:51.814Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:52.105Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:52.107Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:52.107Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:52.120Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:52.123Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:15:52.123Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:52.123Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:15:53.483Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:53.707Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:53.707Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:53.816Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":4,"duration":11.441215517} {"level":"info","ts":"2026-10-29T22:15:53.816Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"Limitador.limitador.kuadrant.io/kuadrant-system/limitador/update","attempts":4,"duration":11.441269287} {"level":"info","ts":"2026-10-29T22:15:53.816Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-ipp-b-a9e67f/update","attempts":4,"duration":11.441247066} {"level":"info","ts":"2026-10-29T22:15:53.816Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":32} {"level":"info","ts":"2026-10-29T22:15:53.905Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["ConfigMap","EnvoyFilter","Limitador","AuthConfig","Gateway"],"eventTypes":{"delete":55,"update":4}} {"level":"info","ts":"2026-10-29T22:15:53.942Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:53.955Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:15:54.486Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:54.715Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:15:54.796Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:15:54.796Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:55.113Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:55.115Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:15:55.115Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:55.128Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:15:55.128Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:15:55.130Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:15:55.130Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling request","namespace":"openshift-ingress","name":"maas-telemetry-e2e-ipp-b-a9e67f","event":"UPDATE"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies started"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"telemetrypolicy marked for deletion"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies completed"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"cleared policy","subscriptions":0,"mutators":4} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"update object","controller":"telemetry-policy-extension-controller","object":{"name":"maas-telemetry-e2e-ipp-b-a9e67f","namespace":"openshift-ingress"},"namespace":"openshift-ingress","name":"maas-telemetry-e2e-ipp-b-a9e67f","reconcileID":"f394536e-4fd9-4617-83d7-66845e4bbd61","kind":"v1alpha1.TelemetryPolicy","name":"maas-telemetry-e2e-ipp-b-a9e67f","namespace":"openshift-ingress"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling request","namespace":"openshift-ingress","name":"maas-telemetry-e2e-ipp-b-a9e67f","event":"DELETE"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies started"} {"level":"error","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"telemetrypolicy not found","error":"TelemetryPolicy.extensions.kuadrant.io \"maas-telemetry-e2e-ipp-b-a9e67f\" not found","stacktrace":"github.com/kuadrant/kuadrant-operator/cmd/extensions/telemetry-policy/internal/controller.(*TelemetryPolicyReconciler).Reconcile\n\t/workspace/cmd/extensions/telemetry-policy/internal/controller/telemetrypolicy_reconciler.go:40\ngithub.com/kuadrant/kuadrant-operator/pkg/extension/controller.(*ExtensionController).Reconcile\n\t/workspace/pkg/extension/controller/controller.go:445\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:222\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:479\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:438\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func1.1\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:313"} {"level":"info","ts":"2026-10-29T22:15:55Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies completed"} {"level":"error","ts":"2026-10-29T22:15:55.777Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":21,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:38Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"84332","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:55.829Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-ipp-b-a9e67f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T22:10:06Z","generation":6,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:38Z"}],"name":"kuadrant-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-ipp-b-a9e67f","uid":"6913d5c2-ab5c-41f9-a0cb-2f1efde8c095"}],"resourceVersion":"84312","uid":"6a2c69ec-99c9-4a0e-b9f6-4313af813fe9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc6b3a1af39e247d103b7061d12b9c4861f3d712f0938408049f6236e0e0b3cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bb1d6d6f3863460dc83909698c93b7220a92894452d19d6457af7be325a88019\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbf671582bae71ec578375d9ef9f8b29035b4686fc4b8ca3ac8a8bc9e42b321c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e5c0bcc6617f9bd1d4a2924298593300a16b3e6b47e3752f5ad97dce8a033a6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6d9c4826f98b96291b3e533bf72b9eed275bea914efc558e9d04bd8b0ae7ab0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6900f9645f0469b317b2c08d9c86e7f681c67d6a9875de81f84f5af4dddd7c9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0fb7c63d78749b052bfc800aa584bfafb95ca68ccb630d7b8bd23c238c4fad2b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"114f889ceadc55340a4307ffc072af09375d86d490473527870ee4f710f22d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e61cc9fcc076284d8c9d0419b5b775425a3e0bb0e7e53eb7a6037a0bcb43651b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81fd8909dd195c90b25833be49ad38f62551ab9057ea9e0162d69abdb827ac34\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2fdd2200466c681f7e5edf0b3426707d815879f21992a63ab089bd860cbc7976\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-ipp-b-a9e67f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-ipp-b-a9e67f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__8652c636\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__8652c636 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-ipp-b-a9e67f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f99474b746a2b1df024fe9b470c2c7b2c02a84e3e8ce1692a86d7c9e07176328\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-ipp-b-a9e67f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.324Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:15:56.349Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","uid":"163f5650-9e1f-4d33-bf14-8385b0a1c260","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"gateway-default-deny-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.369Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny","namespace":"openshift-ingress","uid":"a30ba18f-0cf5-4c1e-84d2-669aa21e9940","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"gateway-default-deny\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.385Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-premium-w3-8a9e5f","namespace":"e2e-models-e2e-worker-w3-8a9e5f","uid":"e2f9ddea-a06a-4316-82a7-57201660c281","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-premium-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.399Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny-e2e-ipp-b-a9e67f","namespace":"openshift-ingress","uid":"ff7b4409-9d30-41d8-9f3b-006ae47cd640","error":"tokenratelimitpolicies.kuadrant.io \"gateway-default-deny-e2e-ipp-b-a9e67f\" not found"} {"level":"error","ts":"2026-10-29T22:15:56.409Z","logger":"kuadrant-operator.AuthPolicyStatusUpdater","msg":"unable to update status for authpolicy","name":"e2e-ipp-b-a9e67f-maas-auth","namespace":"openshift-ingress","error":"authpolicies.kuadrant.io \"e2e-ipp-b-a9e67f-maas-auth\" not found"} {"level":"error","ts":"2026-10-29T22:15:56.415Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-simulator-w3-8a9e5f","namespace":"e2e-models-e2e-worker-w3-8a9e5f","uid":"cb4b55e7-ee19-49ac-b3a3-f7630e716e02","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-simulator-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.439Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-facebook-opt-125m-simulated","namespace":"llm","uid":"bd4ea6d2-5864-4661-a4fd-c4007298e509","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-facebook-opt-125m-simulated\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.490Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-premium-simulated-simulated-premium","namespace":"llm","uid":"5ef8bee6-5dd9-4c4d-b643-03ffd9112d78","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-premium-simulated-simulated-premium\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:56.491Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:15:56.491Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:15:56.596Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-b-a9e67f","error":"Operation cannot be fulfilled on gateways.gateway.networking.k8s.io \"e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:56.597Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"AuthPolicyStatusUpdater","operation":"update","resource":"openshift-ingress/e2e-ipp-b-a9e67f-maas-auth","kind":"AuthPolicy.kuadrant.io","error":"authpolicies.kuadrant.io \"e2e-ipp-b-a9e67f-maas-auth\" not found"} {"level":"info","ts":"2026-10-29T22:15:56.597Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:15:56.597Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-ipp-b-a9e67f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-ipp-b-a9e67f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:15:56.597Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"max retry attempts reached, giving up","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","attempts":5,"duration":14.221344751,"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:15:56.597Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":3,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:15:58.598Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":3} {"level":"info","ts":"2026-10-29T22:15:59.949Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","Gateway","ConfigMap","Kuadrant","AuthPolicy","HTTPRoute"],"eventTypes":{"delete":3,"update":11}} {"level":"info","ts":"2026-10-29T22:16:00.001Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:00.226Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:00.303Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:00.303Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:00.404Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:00.794Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:00.806Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:00.808Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:16:00.811Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:00.811Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:00.815Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:00.829Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:02.055Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:02.236Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:02.236Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:02.368Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:02.368Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":1,"duration":5.77185895} {"level":"info","ts":"2026-10-29T22:16:02.368Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-ipp-b-a9e67f/update","attempts":1,"duration":5.771893551} {"level":"info","ts":"2026-10-29T22:16:02.368Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"AuthPolicy.kuadrant.io/openshift-ingress/e2e-ipp-b-a9e67f-maas-auth/update","attempts":1,"duration":5.771988423} {"level":"info","ts":"2026-10-29T22:16:02.369Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:02.456Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["ConfigMap","EnvoyFilter","Limitador","AuthConfig","Gateway"],"eventTypes":{"delete":55,"update":4}} {"level":"info","ts":"2026-10-29T22:16:02.490Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:02.501Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:03.123Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:03.188Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:03.219Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:03.219Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:03.797Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:03.809Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:03.812Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:16:03.814Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:03.814Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:03.814Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:16:03.827Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:03.827Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:04.258Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":22,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:15:52Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"84744","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:04.384Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":1} {"level":"error","ts":"2026-10-29T22:16:04.908Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:16:04.935Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-facebook-opt-125m-simulated","namespace":"llm","uid":"bd4ea6d2-5864-4661-a4fd-c4007298e509","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-facebook-opt-125m-simulated\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:04.951Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny","namespace":"openshift-ingress","uid":"a30ba18f-0cf5-4c1e-84d2-669aa21e9940","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"gateway-default-deny\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:04.967Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-simulator-w3-8a9e5f","namespace":"e2e-models-e2e-worker-w3-8a9e5f","uid":"cb4b55e7-ee19-49ac-b3a3-f7630e716e02","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-simulator-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:04.983Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-premium-w3-8a9e5f","namespace":"e2e-models-e2e-worker-w3-8a9e5f","uid":"e2f9ddea-a06a-4316-82a7-57201660c281","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-premium-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:04.999Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"gateway-default-deny-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","uid":"163f5650-9e1f-4d33-bf14-8385b0a1c260","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"gateway-default-deny-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:05.018Z","logger":"kuadrant-operator.TokenRateLimitPolicyStatusUpdater","msg":"unable to update policy status","name":"maas-trlp-premium-simulated-simulated-premium","namespace":"llm","uid":"5ef8bee6-5dd9-4c4d-b643-03ffd9112d78","error":"Operation cannot be fulfilled on tokenratelimitpolicies.kuadrant.io \"maas-trlp-premium-simulated-simulated-premium\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:05.018Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:05.018Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:05.121Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-ipp-b-a9e67f","error":"gateways.gateway.networking.k8s.io \"e2e-ipp-b-a9e67f\" not found"} {"level":"info","ts":"2026-10-29T22:16:05.121Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"LimitadorLimitsReconciler","operation":"update","resource":"kuadrant-system/limitador","kind":"Limitador.limitador.kuadrant.io","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:05.121Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:05.122Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":3,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:06.605Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","Limitador","EnvoyFilter","ConfigMap","AuthConfig","Gateway"],"eventTypes":{"delete":10,"update":9}} {"level":"info","ts":"2026-10-29T22:16:06.632Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:06.644Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:06.724Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:06.892Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:06.997Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:06.997Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:07.213Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":3} {"level":"info","ts":"2026-10-29T22:16:07.331Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:07.332Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:07.332Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:07.384Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:07.384Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:07.387Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:07.387Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:08.625Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:08.770Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:08.770Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:08.862Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":1,"duration":3.74027798} {"level":"info","ts":"2026-10-29T22:16:08.862Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"Limitador.limitador.kuadrant.io/kuadrant-system/limitador/update","attempts":1,"duration":3.740350281} {"level":"info","ts":"2026-10-29T22:16:08.862Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":8} {"level":"info","ts":"2026-10-29T22:16:12.198Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","Gateway","ConfigMap","Kuadrant","AuthPolicy","HTTPRoute"],"eventTypes":{"delete":3,"update":11}} {"level":"info","ts":"2026-10-29T22:16:12.247Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:12.427Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:12.486Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:12.487Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:12.487Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:12.909Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:12.910Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:12.910Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:12.917Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:12.922Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:12.922Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:12.939Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:16:13.698Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:14.221Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:14.221Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:14.350Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":16} {"level":"info","ts":"2026-10-29T22:16:14.386Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["ConfigMap","EnvoyFilter","Limitador","AuthConfig","Gateway"],"eventTypes":{"delete":55,"update":4}} {"level":"info","ts":"2026-10-29T22:16:14.413Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:14.423Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:14.723Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:14.736Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:14.806Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:14.806Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:15.493Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:15.499Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:15.503Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:15.503Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:15.508Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:15.508Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:15.513Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:16:16.427Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:16:16.768Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":24,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:16:07Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"85256","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:16.877Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:16.877Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:16.963Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:16.963Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":2,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:17.018Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","ConfigMap"],"eventTypes":{"update":8}} {"level":"info","ts":"2026-10-29T22:16:17.524Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:17.527Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:17.527Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:17.528Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:17.528Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:18.059Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":24,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:16:07Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"85256","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:18.550Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:16:18.611Z","logger":"kuadrant-operator.AuthPolicyStatusUpdater","msg":"unable to update status for authpolicy","name":"e2e-worker-w3-8a9e5f-maas-auth","namespace":"openshift-ingress","error":"Operation cannot be fulfilled on authpolicies.kuadrant.io \"e2e-worker-w3-8a9e5f-maas-auth\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:18.785Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"max retry attempts reached, giving up","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","attempts":5,"duration":16.416595533,"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:18.785Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"AuthPolicyStatusUpdater","operation":"update","resource":"openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth","kind":"AuthPolicy.kuadrant.io","error":"Operation cannot be fulfilled on authpolicies.kuadrant.io \"e2e-worker-w3-8a9e5f-maas-auth\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:18.785Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":2,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:20.786Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":2} {"level":"info","ts":"2026-10-29T22:16:21.707Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["EnvoyFilter","AuthPolicy","ConfigMap"],"eventTypes":{"update":3}} {"level":"info","ts":"2026-10-29T22:16:22.313Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:22.314Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:22.314Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:23.899Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:24.984Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:24.984Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"AuthPolicy.kuadrant.io/openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth/update","attempts":1,"duration":6.19908951} {"level":"info","ts":"2026-10-29T22:16:24.984Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":2,"duration":8.021228291} {"level":"info","ts":"2026-10-29T22:16:24.984Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:25.066Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","ConfigMap"],"eventTypes":{"update":8}} {"level":"info","ts":"2026-10-29T22:16:25.924Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:25.927Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:25.927Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:25.927Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:25.927Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:26.671Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:26.984Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":1} {"level":"error","ts":"2026-10-29T22:16:27.036Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/e2e-worker-w3-8a9e5f","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:56:21Z","generation":25,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"bcdae6aa-d5a8-44c8-b614-b218c8407567\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T22:16:14Z"}],"name":"kuadrant-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"e2e-worker-w3-8a9e5f","uid":"bcdae6aa-d5a8-44c8-b614-b218c8407567"}],"resourceVersion":"85457","uid":"a897363c-6f09-4c63-a9b3-8089ccfc5fb9"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6dce83f39f97c0367b09e4fb43dbb9ac6bc039f021f56995a4049c3fb45ba91d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c705db01d17cd27630febb259896f585ada90151b72f2817e36c8afb69441d7f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a10b161e7feccba8b2b6a8f033bae3240d6a4349156553d6f2a6b753647b6a1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c5bbef4481530ea2369bd731989e8f5c8ac5a3acc0dcd43a59ceffca8199ef0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"18206536fdc9df14914b22dd335e5efffb8bf49c7fb1ff5003094a15d7a8efb5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9757048302ec775746a5082a120a2910a274a26e66d4cfbb489747eca293d753\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"734499c2ecbdf78d65f604476c67f2cbccec7016fb599455b4ca57d5d63a9fa9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"04af64c6dc4dc6460f671d11da097394387d5c916db53aef42195eedf0661195\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"504e99f9c82f94fad3db93fd15d93731a897896757d47a24ebd8be1da24fc1d6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aac831fb1788f597d1e5f96ac969e74bdd85309c90e14ce7355a882a4864436a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"39cc91803ce75875da8d82278df6af8fd0f122985de3c766d1a3d971614b44f4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a51a76b982c7ea294ec7dd61636b7aef4356aa5d5940f457d720fa0a49b38c16\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9550f4a4a2490dd86249dd62cef92206e0a0a841dc4ca0a46ca28b228f90778b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0161cb6a871667a46a6646ebef99902b7e1a19507c78b51d9458556263ad960c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ec492491174e14c7a6f725383c361568532218f639808821248e9051f31cc368\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a865fd68522201b13fffeb69b9260e8a5ea5c554bd71fb9341b05dbf987c163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ef5b31f920809acc29b5ab44befc706f9a60bd0d53e6277811f4ab6506726dc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"36e7e48c468e919ffeb000126c6f5526cc2eb3ff93ba4466f939e41d94ff791c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"85529093d7f98f8ce7c33cfe99149b2241452b607afc6d103572091483871fc9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37f60dafe3f485e9c9d01138e2a437b81423a08767f7793d9f2983b431a81e7e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5844014dfbd58e2e3dc8665f609ee7cda86beb3f6fdec87510d903f6e5b9b1cd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b0e7b4982db16a9e5004266a44bf2e5ce0d4a3d52827008def5a915902a768f2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"41ab00f7fec160574b9f665df42064991bbcf29cb04da24b5000c2ad1df47770\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ffec00766f0a8b1722921244cd9b0c0e7ffa6d7383c407944c28fdd283fa9081\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845d04ca52e9030db9d85f9afd7f2f16b854097f8d49eafa2e71d19d8e742d00\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2f9262afd57863c440d7387cbe65888cb381393c637773c0de318b15dc225766\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"451e1d7bf2d6afb7665cd18652e1fadfa902448ec28eba741cfdd142a8b1934a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a00eab58f7fc9ebea224d2112be8325b64c79cecf07e4da18b420425bfdda54d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d2b8370fe1deac7ebf6c2f1b005fcd164c92d576815ea1853fae2b481680c45e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"920578b1dea4408196e42abf9734959ca9f4bf34eb919f18169d95f2f052cfa1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fc136923edcef5b4a285cdfa8aa54eff8ed9e88c3da7c26700914b0b483bdeaa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f9471360e91570b3b50b30acc81c59387ca05abbbeec4a4aa3fe33be3640d93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9981950090bd59484beab4975962025524fe6994b27f3308529d85d1c72ba4fc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a66f56d8579f53a0db4c1a19bab9c2ed3f86ec089c19a5d8fd55c98fb43316ac\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"57276d0241f91abf06628bc4fba0ff736ea6057234732887a9d059c8bb52b578\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"160130c86c9938f51914073b2ddbecdcf203222682d93c3d8e38abe13a36a25c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"65734a927dcf0a58c73ed97433fab3a159a1d1b7c03a0fb707e008640002b8a7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b7a6e12832fece97bd2bb78e0505810127ff029d7ea1bb49196bb3390e3a667d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75c2eca7238739c94f19b7e717b26c4c82b9bf59d8ece3abffc9d27d391712e9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9ad6c81da6f0e3719ea7209a8ad6c54587d6e38290ef52f98c455aa8737106fe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c81027cd5b3e00be4dacf829ede297998c498edd781794590457c4640638d6ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"979abea78e3b82934f1a44beacaef5df3be84ce22e5dfb9bea89b01f8a302294\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fd2a792c1552820dba1c523dde66f66e669d5f791a905381a2c66433c3acb4c7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2278cfc3c86600f90238f255767e821142b459085cbe1beffe2932dacf6d4d1d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"03503e55b75de31b14d26f4547f527488e5d4041d30236d8e02694b2bc53181e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"63bd03dde8bd9552d383b606c1b693a4f89c7c84323388cbed9a329503cb64f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1d2bd3e7c69c49caf740ecb8e6c32f0f603c33dea5a31912d313c06453bad47e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0a2d7fb06362b2cae59c0c6a1b5b09d6d8725a62102f0686200446dd5563b537\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"39a5500f577e2c5e8c9b10505cae3e5df755ca4472daecfd86c20f66f0801a9d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4c4b40f540fa3ae9cac5d04cc1ab5c08c924e8a9bc448383f417f3ff302e410\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1c00eeed3eed8db0309b98240ae56c38d6246264d37f8bed21ee034e3d5d92ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6d94dae9d70d316ca62c64bd4ba7f07a871032622eb31dc9285357b2772b54c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bcc72ebd29b650d8b25623ca7a32fd8890ace0108b7ab46bbb004d767cab3e55\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f49222560b9f06d1e7b11f02dd951bdf370c238d7db5f991494f1fd9e2756993\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d76416a1c351839de7a59611424269d57989a79ecc6a890c58930b0a5646492\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1bba29ba8e0b2d1cf9da64511d1f0ba37de1d0f054f36472898de4742d6e09c8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f80ee85bf891c9faebaa023a9d01c568c4a1c10ae3e881811cece973cdc359c3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99213e471e3666ed171ce4cc5169242665c4d31959e9261322ecbb220b46d48c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b30c9c7bccdc20c4857375908abe5275511697016edfb4c17f7aa9eb848b687f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c32058dffd04af8e89327ee9be4496126cd9d7085fee7ef151221fc6882eabde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"deba16192d173cdfd957d689426f81b9d0abfa495669f85c0b99f59477580131\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d9b21cbc2817b515e33245a8780578465b51806c923fa0237bed51b366e8be10\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dbe2c89c7acabbb381fcf2512aaa531853cbec59d68e1635a3656ef8ddfeaec0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea485f48e3d402b16502d218ec69ffe159e4fd10932b083a3817c6f0155133ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"542867904c9deec18b31e4e9e32822bc310a54416cac0e3028aee436e8627c2e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b35a952af455ea73c7a6ce675aedabac1226fecdcdc472a99c335608c7c6bb04\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e78d73c927d48d0b8c081b6e98c8c72bd8f616840b14262071346de7b07c280\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32b64446cd701dbb4d3d4e52da83ac7dc73e16aa44c1ebef0189eb24a2bf20c0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"254a3d30f17ff72dbfc3208815b88ac8a5e0b44ed11c63f4ec4925c742084992\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea67ce7c937ec318edaa7d0d57a4245c9429e33c87dc1318d917598b258befe4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eea8cfe8da865d50cd461f38707cd3f31567e987d5edcef002218770552796ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6e9141e547fc177d2f21e511d3b6cf6be70f3389ea449a1e52c9177d5467090f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f0b235365aabeb9fd6ff97db5bfd6d265d985731c35958811147ff51c361027\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4bdd165253f737a66d48ca6f8895cd175ed89de703a67003508c829e5b1e0fec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f7f9a8256960c1399e01bcb7b0fa4c158f08d24dc040808c0147a1ea5c1e5bde\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"82c317f45b8aa08689e9ec8fde9463870d7d82aa95422985eaa35854441ae039\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"922275607a1e46e9f862ea49eb0a9346b9ffa6343a0bac955d8670d7074f2264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fee4e706ac25899596f9d5e179284bba68801cebe827b816699a1764c87f52b0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5ef0fb46753c73e1d6e0418820c6dcb7054c50632fd829f92a8f2a7fa6380fce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5e3ad931dda68137ec0aad168eb89f748dfb74ee5f7010a1e0b7d35d602a47d0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d534b0b3c450211f83ce851ffa3cf932c6f122f2e0faa64d8607357f912dcacd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"86f6df29e447c5468c25de8e36f3fdaf5005e4a9c753561626290ebbf526d92f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e1262dc32946d82bd1e89c40b75d229acc6b80a97c27db93431102b9e1a63b4d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cb15e6830d3f8c65158bb19144944cc34966a8677f4c8f60118718246fa6bf4f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5b216ce19e3d850fdb17430a7db3bb5b38e1ec80c1e2e231ee8741062050ce41\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0b266866f7cfb182055f695d2be283c469112777419b94c31e0b8c66c1b6b563\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f2618571503c53ef55bf8fd0c35fb4db6b7211d20f8eb64f890521d0938f8590\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"83dc086414cb1fb09aecb7004e0d50d932534c642c69d885f48d7b89379c84ef\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"279326a31b9e80d2a08a3762cfa937df26666060293d0a50e52d81a7fe6b4cd6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"075f08305ff769a3452957899295400cdd4b59e670f340b4ee5a609203850466\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d4abd698a18924189493af51b373867acc87cd3b3f0346a3b903717b84659c8c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c62dd4fcb4ceba3e3f295df086369a9e862fa1efa7e88704775309a71d17261\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"654fc3b40b1a0c5e06025eb99bada223a502255bd63b5d861b88cb8561a28c2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f68d9261d49c2ef323d344e412e0b4eb81d256d3fb2118fa131df897c5a6c29a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bff2768979987841d0c870a0bc929839999ddc05fa9c645be25cf05c9328d71f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8204a3de92b8dc074dbce03de2894be88dee705e78fedb8e4d0ea2d75cf67682\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f12b1e33ba28ac5246c7291c7c0d84bbcd01264998a04e71ee5d5243fee73c81\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"89ecf5f4aa435d74763c67bceaf214fd3c4726d4823c02f410e26e9ea1a72068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c14fc132dbd344fb2df947c0581bb933e563d77212e87b7e368ff3872434d8cc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"33ddbe23fc67b64dc17ad9690640032b8b3c343bb11049a6de371607a4940b32\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"468ed0964f5f5879a02c6037a99d1309e6b490af4ac40a01d44826545c156d49\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a7768538e75e2db1ff2e34c19793e4c1371284f192e83fcef7665ccc982b077\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"47761424e2c59f2f5f52f873e5e37dcd32f4a97479b0f9254d032911182e07a6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0c0d6b98d5f8bd33465db55aa22c40fd9e541722401172fe0a05bf7bbcf680c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3c46235155bb6e2575ccb78a48864c74bc9d11f7fe6104b3ffdb7be63c2f7e4c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a87a9d65d88eabc3d285409484337623fac2bcb53072bd80fe75edca07d9365d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"546ab63096f4469806d3112e851fe99bf558325468ab33308c4a30b12a6c1031\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"30d177740d5c10a494e02f317bc4005e6e775bcd500bf544f8bcb7860970bdfa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ca8fe772e5c2a288195dc67ab4e0a03609bddfed6c78b266844e55cd76097845\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7b70c99d035b94e1c02eac85108c78f78b72d0230eefa60760a14d35e60888da\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2732ecdd86497953de70857bce140e636556139ec9540e8b2ccba77fa345e47c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e3ff6f1892588027bd839725a396039e171348d8771b40a58080188b126a47a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2dd46869f5d20a378165513d27367ee07277a9cddcaaaacd2ad49a7a569ca259\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"65d7637fd8a78cd0981dd8afb3ca8b66e1ba9e82dc7d81819fae16a1fa3f3d8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4733a2d462503c7d4a7f57e2b64f31af4c48c55622714b29d6c32e1bb9afd8ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3ed057153ca64ce999048a050117ccccedab09327451fd0be6b1adb991c3dd9f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c37312ffc415e4fa515044ef90cc8f2f3fdd74f048877ab83bfb0b42bbeafd93\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"762c5e1d1d94653971c1a333b533755b3d6787055a31505d39c4724a416b5953\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b818c277741cee094d048bd534ccb234d48d49d3b69e3fbba8887051d693fac8\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7d53c9e9135312b6e1dd6c08ad14a6acdd612d8d438ab03c0040b3b1181ba1d8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7d6a27825870f0236b5b0d0f1c9985ef1c58805628c7140a34cf39d5628c4fe2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5584e16e1bb75e0d7a987bc0f4ec428a64c6756fda107b6532efd667a88d6559\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"da23f8ed39f4f6be4aa949aaf77616c3beef23197aae5e4da1de14e5c0efbc3d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"baaec029d876730d452153714d301eb6f35bc7fa4aa2e46175e972a06e3e3055\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6ad3704491d00f4a529b00c8b068fc344db81730e09fe81ad4a6d42072be5d82\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"97ef782d50f5c184c990b90a1c51b168ff7084007494a7978746e1d8ca4f6203\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8b56c356e9f8be131d417383ebf23ced700e2b0007b92acaa6cb630a8a37093d\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route-e2e-worker-w3-8a9e5f\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"493254de57c12434bd67f141e319e9eef60c957c670d7541fe19bd4e2c0010b8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f52a0e968572de3bb0bf52a9f68b9f257c0e1dda38e33daf86cc546741c54d75\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/simulator-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__f6466f37\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"773492b39dc0ee31\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__f6466f37 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-simulator-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37774b7f18db67195f8cab1a4c1f9831b1261f8276e8d5426d2e9f4a45cc255c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/simulator-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4973a05e72b0f24a2fdaf8ab48bcae8e70903c1506d0b5933be42f44d941b02f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/premium-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__8f48bec7\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"87d1487f09397847\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__8f48bec7 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:e2e-models-e2e-worker-w3-8a9e5f/maas-trlp-premium-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7ed9bc4db9fde2039aaa3bea9d622aae4e906e24fdac9cd36091e9fa815a4257\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/premium-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"24832f4cca4d11ea189129d940bb12e6b41bb4c26ed0e0139c7fd18e189eda29\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a370c312ff2177d4fe27f9d99949088595d68bac1ba6e991b622fbb3663fc9e9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-w3-8a9e5f\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b463c525e34f30a22484f6b68cd56bae3984dfd35de97eacf549f4cc84422ed1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"e2e-models-e2e-worker-w3-8a9e5f/distinct-2-w3-8a9e5f-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__92527206\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__92527206 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny-e2e-worker-w3-8a9e5f\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"615165719da1046b3fd9f4aaaeb8f2b93050cf339a7a2e03f85b86b050a0dc71\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/e2e-models-e2e-worker-w3-8a9e5f/models/e2e/distinct-2-w3-8a9e5f\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"e2e-worker-w3-8a9e5f"}}},"status":{}},"error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:27.127Z","logger":"kuadrant-operator.AuthPolicyStatusUpdater","msg":"unable to update status for authpolicy","name":"e2e-worker-w3-8a9e5f-maas-auth","namespace":"openshift-ingress","error":"Operation cannot be fulfilled on authpolicies.kuadrant.io \"e2e-worker-w3-8a9e5f-maas-auth\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:27.233Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f","kind":"EnvoyFilter.networking.istio.io","error":"Operation cannot be fulfilled on envoyfilters.networking.istio.io \"kuadrant-e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:27.233Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"AuthPolicyStatusUpdater","operation":"update","resource":"openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth","kind":"AuthPolicy.kuadrant.io","error":"Operation cannot be fulfilled on authpolicies.kuadrant.io \"e2e-worker-w3-8a9e5f-maas-auth\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:27.233Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":3,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:28.682Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["AuthConfig","EnvoyFilter","ConfigMap","AuthPolicy","TokenRateLimitPolicy"],"eventTypes":{"delete":2,"update":57}} {"level":"info","ts":"2026-10-29T22:16:29.307Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":3} {"level":"info","ts":"2026-10-29T22:16:29.315Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:29.326Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:29.328Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:16:29.331Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:29.331Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:29.385Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:30.632Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:30.887Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-e2e-worker-w3-8a9e5f/update","attempts":1,"duration":3.653840119} {"level":"info","ts":"2026-10-29T22:16:30.887Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"AuthPolicy.kuadrant.io/openshift-ingress/e2e-worker-w3-8a9e5f-maas-auth/update","attempts":1,"duration":3.653971658} {"level":"info","ts":"2026-10-29T22:16:30.887Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":8} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling request","namespace":"openshift-ingress","name":"maas-telemetry-e2e-worker-w3-8a9e5f","event":"UPDATE"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies started"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"telemetrypolicy marked for deletion"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies completed"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"cleared policy","subscriptions":0,"mutators":4} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"update object","controller":"telemetry-policy-extension-controller","object":{"name":"maas-telemetry-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress"},"namespace":"openshift-ingress","name":"maas-telemetry-e2e-worker-w3-8a9e5f","reconcileID":"70cc6228-1182-44c5-905f-5278c3787b8c","kind":"v1alpha1.TelemetryPolicy","name":"maas-telemetry-e2e-worker-w3-8a9e5f","namespace":"openshift-ingress"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling request","namespace":"openshift-ingress","name":"maas-telemetry-e2e-worker-w3-8a9e5f","event":"DELETE"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies started"} {"level":"error","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"telemetrypolicy not found","error":"TelemetryPolicy.extensions.kuadrant.io \"maas-telemetry-e2e-worker-w3-8a9e5f\" not found","stacktrace":"github.com/kuadrant/kuadrant-operator/cmd/extensions/telemetry-policy/internal/controller.(*TelemetryPolicyReconciler).Reconcile\n\t/workspace/cmd/extensions/telemetry-policy/internal/controller/telemetrypolicy_reconciler.go:40\ngithub.com/kuadrant/kuadrant-operator/pkg/extension/controller.(*ExtensionController).Reconcile\n\t/workspace/pkg/extension/controller/controller.go:445\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:222\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:479\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:438\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func1.1\n\t/cachi2/output/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.23.3/pkg/internal/controller/controller.go:313"} {"level":"info","ts":"2026-10-29T22:16:32Z","logger":"telemetry-policy-extension-controller","msg":"reconciling telemetrypolicies completed"} {"level":"info","ts":"2026-10-29T22:16:34.200Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","HTTPRoute","AuthPolicy","Limitador","ConfigMap"],"eventTypes":{"delete":1,"update":9}} {"level":"info","ts":"2026-10-29T22:16:34.237Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:34.237Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:34.495Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:34.503Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:34.585Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:34.585Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:34.923Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:34.924Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:34.926Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:16:34.928Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:34.928Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:34.933Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:34.986Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:35.632Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:36.274Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:36.274Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:36.434Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":16} {"level":"info","ts":"2026-10-29T22:16:36.483Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["Kuadrant","Gateway","AuthPolicy","HTTPRoute"],"eventTypes":{"delete":2,"update":2}} {"level":"info","ts":"2026-10-29T22:16:36.522Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:36.724Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:36.804Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:36.804Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:36.895Z","logger":"kuadrant-operator.AuthorinoReconciler","msg":"authorino resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:37.193Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:37.199Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:37.201Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"info","ts":"2026-10-29T22:16:37.205Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:37.205Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:37.205Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:37.217Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:37.217Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:37.815Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:37.976Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:37.976Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:38.007Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"premium-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"premium-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:38.034Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:38.085Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on gateways.gateway.networking.k8s.io \"e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:38.104Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"simulator-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"simulator-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:38.134Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-2-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-2-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:38.139Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"LimitadorLimitsReconciler","operation":"update","resource":"kuadrant-system/limitador","kind":"Limitador.limitador.kuadrant.io","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:38.139Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":2,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:38.178Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","EnvoyFilter","ConfigMap"],"eventTypes":{"update":8}} {"level":"info","ts":"2026-10-29T22:16:38.642Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:38.642Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:38.642Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:38.643Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"updating limitador object","status":"processing"} {"level":"error","ts":"2026-10-29T22:16:38.658Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"failed to update limitador object","error":"Operation cannot be fulfilled on limitadors.limitador.kuadrant.io \"limitador\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:38.658Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:39.370Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:16:39.465Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"premium-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"premium-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:39.479Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on gateways.gateway.networking.k8s.io \"e2e-worker-w3-8a9e5f\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:39.485Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-2-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-2-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:39.525Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:39.546Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"simulator-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"simulator-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:39.546Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"max retry attempts reached, giving up","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","attempts":5,"duration":14.562420341,"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:39.546Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":4} {"level":"info","ts":"2026-10-29T22:16:39.620Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["EnvoyFilter","AuthPolicy","ConfigMap"],"eventTypes":{"update":3}} {"level":"info","ts":"2026-10-29T22:16:40.202Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:40.207Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:40.207Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:40.923Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"error","ts":"2026-10-29T22:16:41.129Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"simulator-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"simulator-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:41.138Z","logger":"kuadrant-operator.GatewayPolicyDiscoverabilityReconciler.reconcile","msg":"failed to update gateway status","gateway":"e2e-worker-w3-8a9e5f","error":"gateways.gateway.networking.k8s.io \"e2e-worker-w3-8a9e5f\" not found"} {"level":"error","ts":"2026-10-29T22:16:41.150Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"premium-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"premium-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:41.170Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"error","ts":"2026-10-29T22:16:41.210Z","logger":"kuadrant-operator.RoutePolicyDiscoverabilityReconciler.reconcile","msg":"unable to update route status","name":"distinct-2-w3-8a9e5f-kserve-route","namespace":"e2e-models-e2e-worker-w3-8a9e5f","error":"Operation cannot be fulfilled on httproutes.gateway.networking.k8s.io \"distinct-2-w3-8a9e5f-kserve-route\": the object has been modified; please apply your changes to the latest version and try again"} {"level":"info","ts":"2026-10-29T22:16:41.211Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"new non-blocking error recorded","source":"IstioExtensionReconciler","operation":"update","resource":"openshift-ingress/kuadrant-maas-default-gateway","kind":"EnvoyFilter.networking.istio.io","error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:41.211Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"Limitador.limitador.kuadrant.io/kuadrant-system/limitador/update","attempts":2,"duration":3.071636608} {"level":"info","ts":"2026-10-29T22:16:41.211Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":2} {"level":"info","ts":"2026-10-29T22:16:43.211Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":1} {"level":"info","ts":"2026-10-29T22:16:43.640Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["TokenRateLimitPolicy","ConfigMap","Limitador","HTTPRoute","AuthConfig","EnvoyFilter","Gateway"],"eventTypes":{"delete":58,"update":9}} {"level":"info","ts":"2026-10-29T22:16:43.714Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:43.714Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"started"} {"level":"info","ts":"2026-10-29T22:16:43.732Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"applying limitador resource"} {"level":"info","ts":"2026-10-29T22:16:43.733Z","logger":"kuadrant-operator.NetworkPolicyReconciler.operands","msg":"reconciling networkPolicy resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:43.823Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"limitador resource applied successfully"} {"level":"info","ts":"2026-10-29T22:16:43.823Z","logger":"kuadrant-operator.LimitadorResourceReconciler","msg":"reconciling limitador resource","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:43.834Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:43.835Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:43.835Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:43.884Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:43.884Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:43.886Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:43.886Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:44.545Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:44.616Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:44.616Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:44.682Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":4} {"level":"info","ts":"2026-10-29T22:16:44.711Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["HTTPRoute"],"eventTypes":{"delete":4}} {"level":"info","ts":"2026-10-29T22:16:44.995Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:44.996Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"started"} {"level":"info","ts":"2026-10-29T22:16:44.997Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"limitador object is up to date, nothing to do","status":"skipping"} {"level":"info","ts":"2026-10-29T22:16:44.997Z","logger":"kuadrant-operator.LimitadorLimitsReconciler","msg":"Limitador limits reconciler","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:44.999Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:44.999Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:45.004Z","logger":"kuadrant-operator.LimitadorIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"limitador-limitador","namespace":"kuadrant-system"} {"level":"error","ts":"2026-10-29T22:16:45.722Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:45.792Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"started"} {"level":"info","ts":"2026-10-29T22:16:45.792Z","logger":"kuadrant-operator.KuadrantStatusUpdater","msg":"reconciling kuadrant status","status":"completed"} {"level":"info","ts":"2026-10-29T22:16:45.809Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":8} {"level":"info","ts":"2026-10-29T22:16:45.827Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["EnvoyFilter","AuthPolicy","ConfigMap"],"eventTypes":{"update":3}} {"level":"info","ts":"2026-10-29T22:16:46.031Z","logger":"kuadrant-operator.AuthorinoIstioIntegrationReconciler","msg":"get object","kind":"v1.Deployment","name":"authorino","namespace":"kuadrant-system"} {"level":"info","ts":"2026-10-29T22:16:46.086Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"started"} {"level":"info","ts":"2026-10-29T22:16:46.086Z","logger":"kuadrant-operator.IstioExtensionReconciler.buildWasmConfigs","msg":"build Wasm configuration","status":"completed"} {"level":"error","ts":"2026-10-29T22:16:46.692Z","logger":"kuadrant-operator.IstioExtensionReconciler","msg":"failed to update envoyfilter object","gateway":"openshift-ingress/maas-default-gateway","envoyfilter":{"apiVersion":"networking.istio.io/v1alpha3","kind":"EnvoyFilter","metadata":{"creationTimestamp":"2026-10-29T21:51:56Z","generation":87,"labels":{"kuadrant.io/managed":"true","kuadrant.io/wasm":"true"},"managedFields":[{"apiVersion":"networking.istio.io/v1alpha3","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:kuadrant.io/managed":{},"f:kuadrant.io/wasm":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"df730116-97ad-461c-8710-17511d247920\"}":{}}},"f:spec":{".":{},"f:configPatches":{},"f:workloadSelector":{".":{},"f:labels":{".":{},"f:gateway.networking.k8s.io/gateway-name":{}}}}},"manager":"manager","operation":"Update","time":"2026-10-29T21:54:02Z"}],"name":"kuadrant-maas-default-gateway","namespace":"openshift-ingress","ownerReferences":[{"apiVersion":"gateway.networking.k8s.io/v1","blockOwnerDeletion":true,"controller":true,"kind":"Gateway","name":"maas-default-gateway","uid":"df730116-97ad-461c-8710-17511d247920"}],"resourceVersion":"18722","uid":"1ab6578a-2b85-4bd1-8dc6-9d5837b00bd6"},"spec":{"configPatches":[{"applyTo":"HTTP_FILTER","match":{"context":"GATEWAY","listener":{"filterChain":{"filter":{"name":"envoy.filters.network.http_connection_manager","subFilter":{"name":"envoy.filters.http.router"}}}}},"patch":{"operation":"INSERT_BEFORE","value":{"name":"envoy.filters.http.wasm","typed_config":{"@type":"type.googleapis.com/udpa.type.v1.TypedStruct","type_url":"type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm","value":{"config":{"configuration":{"@type":"type.googleapis.com/google.protobuf.StringValue","value":"{\"actionSets\":[{\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61b044087f8d56658ae99d15d4fab3cf1ad74e6636795c133e054a5aace0540d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e511d90f2140d9cde0b2100a0a488dacadd8f510bb901601d5e6fd25343a0f1c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e42d143d6033a677e2aa0de97c78600094e515d7c0d3f86b4925ef8be636163\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"26b7799af8a40e8b9585c255ec018a63b0074c27282d4dccebed45f14e703b5e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ce74c295ef1588342c7308478a1dc6f6aa2cefc063e489a124e536ac32ecfdba\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbe95a07558afcf05ef68ff5beb293f527d6ab93dfe79956b5406dc463d78363\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"40a29ce438b5ca497e4389ce52025a9b91c0cf3177b1bd5c8519b041cfdcf75f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"845137604829fbc62550504d7bbe5ae8d55ea1cf474160cd789a72e811000e4b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5322619ef71b1d1ea3204f9014d0341d4402275b6ca23fca69d61cfc9a61e883\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"16b86e50920afda06ca195a717436238f5fca7f2e1bbe0939875bcb7d559cf31\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5da9070dfa3a5637213b5443376170dda26f57f381af542891ff3b19cc7a9d06\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"00ac1aeee65e93fab2ccfd89c11167f4d954e1cfb3e8b09ad3371a4fab4b6369\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"55c23b9552cb66c175ed2202220df6480eae89be2cda2e925458acf31c5bdbce\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"99f16470bd82ba57465b128d1c0fe73ef189001d77c6ead3fc34c98ad3ce27a2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6d134df42d4d90d93840f63dc770cadabd22dc22af01f991b6c067e96733c95\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0be74a5083c4760789001949965ce7020664f6347b769f9f20735f95f9d34989\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/chat/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4902f5a84509d49ec2fb75275af9692b524b1334f7c919eff1d9f33957acd5c4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4f0e9d14c4d1857d5415458306310b00d6a94ce68179c717917d13d30ede9b87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29d1c55f30b76c66bfb15588c297271fac7d5e9ca415f0c938d63e524a8187e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"df729ecdaa88f0abfee16b94ea7be9c5aa7ccdfe91fbe0676e22ca4bfae35f29\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"69baf76a5f2e8f4f8d3e40025586b942794274a22455dc40e0b7c0116f0d2297\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8199294e302361a6898546d62809d67d522e9c2b375c8b8727f0d966f7ad4d39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"61ef91ec2e76cc107813a7351d7e38bb32d1ebbff452efa771b01f8a512fb99e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f2d9c20918355999f92bc489c836e0d17ed8acb713739da4b73fc8ee019fc8a4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c19d17a63dc280a83fa4dce8ef0f825a16118c6817d3126d095473335018edd0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05aa8311318e9111c5925f4be454406e209ab832bc6e8ddf01725ebe4f1ffdcc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e680857c19914d59f115788ea93836704a1ddab04f5e495bf863d62ad8a5aa8e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96b761d418352e3f8d172aa80bfb5542df670414bec97704e615f2e3e665c8aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a199d441e37ffe8d62509ae7048cfd055df0de5619e9be81a8f47f9a64a7051\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f17cbb57db714a7faf03a7e4ef3921069096709486e13c6b84b4b75ded84ca96\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8631ed26c63871d1138b31e9c971d72ad1152273309b27ee33862700ff4fb0c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"67a5fec0fb2398a03579a732c5e4640c9f9c5db5385b91db90ffb49522369904\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/completions\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e5b5be5a42ead835fa1a13840fda21cf5afb14b8226da9a3008a321db777f685\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a01c6bf1aa626b04ec6a9fc85abb6ced9b4a9c4cafe81d2176013cf3b0b4c4aa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0eb9568cf0385cf054d8f3ebcce089d8b225a9fe1b6061e3689f7bd26415f872\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"633e4cdca29207ccc8220565a86635db5bf3f227ef564ee1a0da6a5d6076231e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ecaead2c94524df89be70a7c961f93dee41ef96545655d22914542a89dffe341\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b9f3d06eb6a92218fa1757dab6cb8e66e42102d46c94e6c0db854f694d6d855c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7054423a069def7a36dcb993faa1143223d985021782b2552d55a522caf2eba9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"deac1d64e5b84f2fc26848a49153d512090eb1e2bffb72dd7091fd21a1234e18\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3dbcd4467449162cad999d40988202fafebe535215351d004f1bf05937c76508\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"534f6056dec477fad33defb3049c84dc5497dacd9f6e3f2061b13ba089ed1cbd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fa823b540319ebed6b9b488f79dda81b66933f7e616cfdaebe3543ae31b33b13\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fb6ca2eee2169356e662d36e92b2b679a1235a86d976f9807297ad56386f6e2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0427c8054235bfb15b63a5a467ab470ce1cca867b5a232117e73059a4ec8891c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4aa2417057e81c2889811e45d786ab1591e3dfafc889b838aad26a3ec2cbfe9b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"acb4b8def068bc86711642e3242fd621a66a54452bf86a82586fc6bf69e8192b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"66831c252eeacbf3e19995c48be4a005b1726766550076c58cb47b979bece639\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a80090acc18b7b092f5e9f2d49fd8643f16514df89a716f8f69afe4a7afebb76\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f85e753996f9e90384b461c5504814ca0cada63ea0f44d6630a619ab36edbe08\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b72a3d2d64d0ddc05f076a7fcf59d924552b45080846c09e1084e67867a76e9c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"cd58d9e2c4a744adbc8ab336cd016f27bc1f14a1de2e975afa26b7f5113d1bfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"29c80f1787fdadd41eb24cbda56972d49e35d261e06b4f4fcd5851c7e2de3068\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"277489d8f3c2c5149e18b965c81958774efa7e81299a66265853d6af2e16037b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7c211141c74fe1e91cc494ac860a81616dc49e2a5d1951dc70bf0f42824d53e5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/responses\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17df13edb14ef5c49ef0cc29deaea97728695c57b5ccad8feb2b23589083e083\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages/\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4e5c1437f299959e62fd8c200a351f13f27078882a4684be54f26facece20f96\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"014f0c5a15872002db778e7e40dfcf7dede4ab2db05bb6a08641f5d523cb3afc\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b9c6946adb079822c7b75166f990a8c6505dbb8a6487fa707e670ff65560e668\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"bdac37244e7b891cd2973e74c7b0db5110c344505a09a86e51fc6486ba35139d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c92635c142b3184e91a78fe113800dddc971eed3a8849837afdf52df706aa5e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ea8a88726b68ceff7de514d89e12df024a67856b697e02c26b6e762395fdaf0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"362c4db530a1f2b250b39b0b7388869d8386a8e10d881cefc4c02ca9e97590ec\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"81df9bef1abee093a91a2eaab4b1a53122eb16d4150f27c879439ca5d99112f3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"efc66033da0da4dfd829f59f79b4f7de512c24b6b150aa338f2a963b5d74b7ce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b3be2474c46178c0c39839b29d8d7c87b103574b042bb23175ac0e9786fde158\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d3dc05ddf6e7ba7b9f9979bea25d3874196895f35b8f4cdf2a9ecdec10126455\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"13fe2d56bb22ec9a1307da7bad05cdda8724fe788533352aa581ffdc96874c78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"05112428ba8242e3d6eb64227c365ab9f0e9e873d13761ea2e2a4738ccab4a0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbd262e90a5eaaf98d72db889488cbe13bdac9381f78343ea46c402679569fb2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"100022a5906a36e4db6527195deaa1f3eba3fada253c82ce0002a171c3d2c1f0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"9794c132b0cd770efeb9723db862265df6a3584117821e44e2a5660a971c59eb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/messages\\\"\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7def4ca304ff3869be64c2c02523fd9d2ff43465099dcd1124399f293eb4480f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a86375603000eab9b808785894e0e63f3e53024a46681e97c41a06c4e0c67023\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path == \\\"/v1/me\\\"\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54eea38241838159e47386cb814ad20fc30631ee8c42d57f0ff8da80fbbf62a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5b69938a04a8020c8a8d10df4921f2989326ca4811c3843a7201bdb1d5cb848\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c5a685f2a5ebdef5f1dee488990c0798a45ddce399cf99e7d0c505a5f46c69ac\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0fcfc87f76b773c6a38375e46d76e569a372370e3ae2e7003932ed8ef776f5bd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"fac07f302f653115fda3d376325a268abaf66025ed0e4af73e88bea3f41fe933\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"aa28eac51fc5e37c385a11a534759b09fb7998ba74bb01195dd8ff89d9e9ec43\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06165835c4461c0b16a2bc5bae936aff3c2f351edbef8aa378f1110874acedfc\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"17390f436804c5d305f1dcb9ea78a72032310736cf630bb9589448f605bd1fd6\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ad8714d3b8aed2a9ffd68fbcf0288557e9c1c059c1b59ad3e9a09910b37fd61b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c4353817d988db43a8dd6b0d5c29305f9dcda76e19c9ef2c820808b0384a0bf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"726a74c13fee356e859d9317271facbb60b066acbc5571de22d056f13c60878f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1415e0d2aa117656e44a7d6aeaaf16aa87f18bdeee129f7e6757b2e1c7f996d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cad6ab5a81a65fd4cb03a0fefdab5de82aa18c30a5b95078b1d05214b0606f40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"0629facd48a81e3c82281be4a3f8566f55e61d1a30a8516b23bbb63c58e8f6f8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e5f81c7f7812462ebef000c68dc043013159f22201d2eeecf05c220e809f96ed\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2e292ccc99f990aa723c04a99267923f5b62fb8f3e0ab1a978e8334b9397ada0\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"68502d1c1143a647ad56f2759ea89a4c5b3c74a8054739f7e7ea9ba6535e3b74\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2b69b629cb2b5224adc61a8925f43333ba0b52ab39260c124057e9e82898937f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"74b47f1aa1203aad58596cbaab10ae46e8fddd08ac49eb57a26bdba532d88e72\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d1e427bebfc099de9df176c73ee76d5dbd6f77919e840913d3a10818678c7394\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3167d3bf853032a93e8569019dcd3e5aa33af9cb580cf9ca138990567fc9d857\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"482d2a79771eafe7f8d177701f43a13c6c4916251440ca00830042e050247443\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"99606c4eac496429be47144db9f3f48867815df12eb99d7be8073b767d7e44de\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e635ba9dc59ae1e09b34ee6e0f2718b1c31e6f6b6ff2bc6d05c094fedc42c40b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5d590119308c6f848b12dd3ecdfb1b06cc2fe172af702455c342075944a045ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"caf1a50009b65f25df3a996283d38ada17bb57a2ebed842a552f137f6121c63a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e042276580ed8976d8ad3afd87a71640025c28b9b48f5c88eb159ec9998209f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e17697b7e023603155a06feebe0602591826e794ee2f5189abf795c259be1b37\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0829dbf2b5dc0900de272826295adf351de381b46fa6fba00b896213530780f6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e772a79f4b1660c75cf3493e21c9ddb58d2de640363115c57dac03a10f22c33\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"cc1ffc2ee4e05618c28c108cac668c0c02eb8e658953439e47a733edab44a1a0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4fe1d1c6df78a26f30e2392ae9da7fc67b0845dfda48a89e247bee6aa536d8e1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"486615827938fa99814e929fe7dc62bc16f7563179fef855074eb73dc7ce4724\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ee2f6a8baeba450552a3e168b9df1808bba4e2c59106ad0881ae78aee4fcbd40\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"98ec9d74d07c88c1e6923ed1cbafd4c5b41bf1763b3a942282f964f72425ae57\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"653f23106eb8a10791805e2f9355c750c56aa6873ef311fe707e76083d93d55d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2ddbced6f2f51d410743da1d9db1257d0006d99f38986dd7cc7efd26620791ad\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1e776cd43733621e16ebc27c91dbdeea062f73e4dde2f494701c85a6843faeed\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d752a44ad8df3a50b5a1147110eb89039ed764e1fed197b1f77e0935c424a90b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"62f67bf9885222d9a86a95e02ed17ae26ad7cf71e15aae0a7517e647c29618ca\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3083301b5359be118f04faaefcd72fd127f2297a3374ef7231b59a59a31b405c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e85460469045801c3e6927ab49333ff01612a4899d5a7c29ec27824b9942f3b9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"67c67ce733de50e7b3d797bb248036b01badfe02e958f5f76af05b58a504989c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f9b414e31cae5d16cc1ad22ba2462b8816d9369a97316f40f32a6e7912fc4f78\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d4a2275e6cbab5c26d5c3cf2d75aa2776066390e5b66f5498b16b26bc596af7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e33110b3dae1dd80b2bfa573def0b488a6fd4f1243962fe81d58e1853ed2d3f5\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"23672b974f0dbc05100a34c78d2b029e41f1d5a3752f3fcb52915f56db360e25\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"a6183db94e49e3ba0149a19f4e52ff19aebb55d6261b0cacec0656136bd2adf4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8274337fc3f0de48e5213819aeb4a46559c4f8b3428c1bae43c0d75207ef5264\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"efcdf81b8f74d74207beb897f447376d1f950ae12e8a330f1ae67b0d9dc6a545\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0e89fc4b75d3a5dd95fca2c4d8ae33c7826f05a8016c44eb39e28c3c1860fcfb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7f0f599e497ae797f3b5922614ceddb3375c007237412d01b520bb7498ef288d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ab505bdf28287fe00099987c1bde2c2f297c40c792a7f6cb5fbfa5adc44754d3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"06c1aa31be81b1f5c6266514c955712865b30117291a39dd749994f4ce931145\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1704c6bc15d6f547acca888061680f2275f690cb79e5af6fee44747bcf278b95\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"6a8319194e2c2fc998268cdbab03a5aae2d83019f5ac30c316c4e548895b7c63\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"eaeb360b41b3f9e0bd6b247d4dae3eef1ffc3355d6e9408df3f8f71bc7f033b5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"32cfee4e66c307d5ebed6a406d2260f4374553d184b5486fc53cb64bc6ffcd8d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"135ffad9bbcd33779a0b9a1c0dc5d5f547356be21489762803640aca855c728a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"3194cef788c3fa9898599a57480aeaed07c6eac2edf957788235b37d22918588\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"17002b7f0c8e62582ad262d9c2b8b038ee7f2a9327fe34f21fd4f47134b7b8cf\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5acde2b886749c1c54f99db5c33887e6fc5ed0caf412daacfb5df0f329882c66\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a6a6232fd5656520e75d100c41add5f1637dde9705a4ec608bbb90b724c258a5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"37a71c27032e51fdbc7ca688064a47abb86230a8138af6eb55e8069fad975a93\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"92917da87eaba4f2684cd45947a3698434b99ff4ca6d3ddde51d6573aecb1600\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b2b26e0af9ad7defb486e5d1db19af6bbdd0998559d16f3776651669aeb4d067\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"aa7038625b8f43b0c002f79637065e5ab90468f50f998759d08f2c4640c07c04\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"2a62f0614f6526bc3f195f838aebd1abe29514f2707db40d9ef738d645ccf001\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"de97dd5d45c6eb12b4a1112ed1f362d8544427428d2249a399e26ba069d6aadb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"22b2ec7ec96ee09c9e07a84cd3d313c2223af42433bbb28c5846401f64d5e3c1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dc061bec60bd28b1c132bf30965b4810124429576337bcc4a6030617600d1714\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b188b939a496049e47b8ef664d7c7c490722f1753404a08d89ccec1dcb87b8fa\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75612d85af2bae456dadd78163b2d2f9015c0a0bf4e20bcb8a555e6a5ab3b8c0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"96bc4fc13cb63707a942ca33034f78d2b39476a10860398523789db3990584d1\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a4493fc88328eba553ef36791fbf4706bffae04a1ac501d099b12309ebc85c6b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d84e45c7a3e370ea510e8e0294e009b29bc2f2ea789c47559293007b6c4410d2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2d953f7313807988e63546aa32431d96f77e6989c672f8ab42827c1c21918630\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"dd2f15d9a08862ab664dadf9bf5da25828d327a11a07849fa919713f034c2b0d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d69b9c128f599c9ea1af84bb3e783ed71688baf6b3ad2b86f2b7183f9a4208b9\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4dfeb9ff2318af8f84e70b11545800bb83948c080a97ae1ece5780d4022bb383\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"dd89509e97b96670685602ae2d08749226db8693944d2c6f868af9d3e0a5feb5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"1025db78adc8b9c9592b692cc227b1a306a99ac5502300d9ed4ed7615f5e3ef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3386c5e86c72abcdab369776ccd7182024ab8681cbe497e81724868f101a3c0c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"58e90354179740b1af406b2911c9997f3f3283475aeb77ce7918f3b3239a293f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"9e75e9fd02f51c2f043b145c5d6b82e95f1447b388ee529262aea27a6a2774ef\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b89d1075a79c93acaa097e4e6db4d6a4b23bf3ffe5e964409e29b258ed725a99\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0913a452a02695c6681f1037232199b40b64236fed4d29cdbb41561695826340\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c0b495d1a10c1cf1548ef17998cb18c0ca25371ad42d5ffe1aed42bd55e31ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-unconfigured-facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"010adf02b2e7deb40c572f4729b6dd4619847c8e6344137326b72df28772fc1a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c04f8a7c7387e6794115c41161cb001d8a07340d2878cb8f36774a8f6a200ba4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"105cf4dd91a8abf4a93abd65b255521c3d37b560b5d23f3ec59757b5b362fae6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7e7d1a0ec6d957a4d4de94f93078f10e836b23442c9cfa90f11c8520cca12e87\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"75fd86e2a4870af5fd78f2ad7aa2a9d79aff977b3678d81954b1e207a9315f2c\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c3cfc634a11046a837448628e2f17db0ed3466194da289a808544d874ecf6451\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"54cd0149b818480305f3d0024b3c95629cafb641b48195d003b2b7006d5c6bcd\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f5bc618bde549671e84473b23ef3632426f8606e2045744a860c603f2a7675d3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bf65ad13397c94660867eb0205e06d1c9bebda4b019f632c0d0b8ef989930381\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d8d67afd40f17474755bd3f6b00e265761bf5154febca129bc3f2b0bcd749c41\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9fa9cfc2b4e701183573419a92c79384cd30210289602f0115c75c5029d55aa\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ac2105eead12bb02dd7d1691cc77fc8a580b903f98564a8fd585dfa345dec1dd\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"596921ddc7ba8523386263c5cffcbd6ad9b6a385318ed7e24f72be06f36fc398\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f4ae34c5c82a0969651301a535f404653a60a5d75f20c7ea56ad9bb89b67e9fb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f95805f0e9b755664735d898c1d644d571943be553204d3f86136bc35719ff13\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"95c39f44eae69bd53f57e5ff93243887dafd591c9b8cf2e736f0ab034e67021d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d5571efc1d304f5bcfc2ffb4ac6819154ba5556c29ce33416d460b887427984\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d6b359055267732253f201a1fe48f0abe6d5e22b011c70e1cb006eea672f535\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"e91aceffc2d4f6d6b120625bd3ca23781b74a1cae6cf1da26bda310bbed0ef07\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c8475d27649a649c955538ff79eb001372050ff4f1d4ad295b01dc6fcc69ba2a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a402d1681ab35bace735c19b1d084a86eb3d741d4e1c14371cfdaa55d22c3ebe\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7320c049419b863194fd55db5ebd887462dd24e1289e6308d79f047431f2bed9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f9b535aed6243496a67741936e53a0d303bea1b872a06fb62f1f9c27150edc40\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5eeab80447ec6c71797517b4d94c6623353e89097743360eadd7f31115976dfe\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a9800464506c58f005016df354e160757732171ff4d19747202524955329b998\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4984a24eb707d1b965a79974a98ed4afc271f2ca356b150cbc8943de1ddcfef8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c82a1a3dc2ce54c0b664f79a2cd895a3c40f774b3694999badae8cedd328292e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"276f5d5d67b2bd83c05c2b39e4a262885498e6807e3129a866eff0651b3604a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"669658556fba0f45c2a82def2f57614416614ddf154ed8dc5f4f9188f10130f2\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"692f39321f892929348fe56801dc14c8a35eaf749609a3a5f4b5e684edddf17c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"c4399a95e89654e5b2bb5fabe45bc947d11ccd1448ebf64c30b195b34f239d58\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5b273834f06c6341dd07bba6c809b3297ba2514e6d3b9b5d0f4f8211c68ccf8b\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5e4821ff903ad6ca2e1c42162432e34d8b0a2a78052961e753d36b742193432f\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f35ed2fb168a3a608435006c8c1b103242765d7d37f41bf1dbdb7bbc0331da89\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a91faccafad197e2a4065ce3d12a052ac484d2e8fb2fc9265ee48f02b28e6dce\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbfd0ada86117ffb0a134e591bf8b8390012983d25496ef188c6da73fef5eaec\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"0020c64019ffd1a0bdcc75e6441e6a30e6d8bb08f463f67bd2408a1e82b95b2a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e78a4964c93ec23890e62f7f50201f5b832b4c714066a914dc734d8ef60e8213\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"7c924aa2b37ea38067b4e69052d541ea2e7c86fbdaa79b19f9ea09e87adbe4ff\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5cf96eeeaa56bb891ea0cba28f7beabf17a8c0f061ea01c768ed842dd26334f\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"028a8b5bd5d4e690eebb2f20c5fd47cf0b3c6e2a3619ba9e55322bbca7b94cc3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"8fe4100eab1f023f5b06dd8e19bcc80109b82503466d49576acc234cdda9bf0e\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"80056c658070f49140955cb6eabdbd252857a614af6b0f2f2de7a1ab1cd47949\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"53aad0199369eb8c8f787ea099e93092089c04344e8f910dcff366f54bc831cb\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2416d7b42d11a09d7152746be0e114f8fdc87d0fbd0efa9dec5b52b011082194\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e0cfec53d1f17771317082d9a7d69806ae3468971bac79a1135f2b0d51ecdc07\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"50c2058cf11e07a931b06ac4446a56eee86855f00badf26618abe486a7bdcfd7\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f3b6e6c38a521fae8ef5c7fddf3b3178baba88effb4e5338e0b387e28ecc468d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"134a7a790ba665547ca14f80f917549f66ee5063fc41096471c0778399db6dd5\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4ddd3fa1f54c642a57a48737e710ec0116705776084d8cebd8134dfa49accdde\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/premium-simulated-simulated-premium\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4d18a96899c43d55ee63d2ae1a7a938c7e873d88b2fd95f06b2e3aae2c7f1c84\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"44e38055536c3f0d49cb81abb42bfefcf2c78faf963a6160afbe459bbc04db39\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d34bd12ba2030284fcb69127f53b8158bbdd4a1432bfe619165b4c2c96cc061\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"c9dd9c233e43b53241ee27e937246e51b8f3331f30a7fba22640617c1b0bf47a\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/chat/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"319e246831bdaf5e765e63d5511b516594fd2b64527850e2ddabd2a4a85532ea\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"7cfd2ed5cb8a5913fa5f55b92b02805c6778991c01c80eb14a0962cc710a56ff\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/completions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a8c8220ad6f1387002e262ace5db78a2c4bb39e5953306702a228215174f6796\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"87e1712d02794c6d66ec1a932f02901d7a4369f46d0f041178cd3efadb7f59b7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/responses\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"1e077a716d89a43572a3c16e8d0b0436816baa48a2ea227603701f10cad6d6f4\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ae9eac2a2b8c8311bb8c6ea82ab445a5d6f50d2d51c3f79962be9d82007097ad\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/facebook-opt-125m-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"3f23315aacd6e16f4ab41f96aeedc9549d1abdfc9476577a47d45d12875dec5a\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"165d3b8e224f71685dee07aadd133117aeeed097eae99437d561d5bfa2d22233\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator/v1/messages\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6687eb3cec74c6c51428ce3f3d22d50ba269f59015d1bc8f185da49eb095534e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"05ac0e89d0298398d3996609d7c22b514bdf08bfa3787653bc739995c5942441\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-2-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"bfd36c5ed73eb81df97258ffa1aa36d8cbf6f3e7a8096c33ca4ff417be59d002\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"d5ac583036f3821c88111dd82571eab1fc94aa4e9fcd045b27336f798e26075d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-embedding-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d303c788902ad4467c7ae545d65cbef45564d1c0d56396c93057df3909461aa1\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"4a6b0d84cc35c0f532405eea81056481fd54e7ad71284a97ce8f6a2424eac819\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-trlp-test-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"2f53b030326b8e1f5908c601aecd3fffcb6d08a8337d0bdc53ee1fc699a4cd71\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5c3bcd9fb119b0fd45f3b4ba5de5f905cacbb4963fec309a0961a40f76a7a7a9\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/e2e-distinct-simulated\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"94ddc5e77f082c32bebc7a36bcebf621518ebf303e83b9c540da1352d04e620b\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"50057c9a2acf4ae7152e8c97f7778cb04340d1470974e5272422d0bf244a4e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/llm/echo-simulator\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"5c6918972d1a7f8ad5201880b7d6d9c1191ca1f25376682f691def7868e3fd02\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"01cc37113b4d6c301e355f63decf46a21e93a023494bdfeaeed2890c97ec1f57\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/subscriptions\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a82769ff87473da04c27497e160e9b4b1a5dd93578e0cf2342be8b2f06845269\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"e747b72d92315b743934153588614b27670cf0c9d9dc4fb380ea4965def7f235\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/health\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"06b05a8e4dd69bdc4f333ad9509ee8cad3c5c0f5dd48edbe94c1158b60f79ed3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"661962837510c6dc6d1faa64e61ec3086efa9e0a2e7315c6ded616c1879e5ba8\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/api-keys\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"b64d1d3a1a41de71c5b05aa58c2da5025409dfbb29fbaa63fe6a7b8fb71bf42e\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b4bfec1b33959dd0ebfc5cd6fb410688e820d4b55c7f149cb4acc4353f30a9b2\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/maas-api/v1\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a7740f6e77d024a437502c023fb1d8939cb3cc2b9ed7f4073af7d779e19459eb\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0)\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"odh-ai-gateway-infra/maas-api-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"f82564e076ea3e672592bab71e048537faba17a5e909884c2a0204e235905a69\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/v1/models\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"a908063c86927e6bf07b7d793aad9f277ac3c2a8f5f5d468b116cb9e07929b14\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-2-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fbdfff5b213f506d78434055d011cf63d616653e502ee04408a43578986e1e5c\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model-2\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"d1d232e06f90d479cd9b802f24889e83af58c51cf54ba273d5e24dcb8a297688\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-distinct-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b49f2d7e152d4de959577465d2494ee11771b4c439cb6eae71c90bff26224fb4\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-distinct-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"810f299b76daf089b33c92cfbe0445ab5cc89a48d38e36df0cc89ed6cd1fe8df\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-embedding-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b27d6255cac73fc039120e157e1f3ce0e99e86995ac5a66974d5e8744df6c64d\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-embedding-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"4f800155f293f82eeaf5fd6a9553c0a1bee90f47a295bba8d7a04b3f11faea33\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-trlp-test-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"b1ccc7ca46f6a14e90afe1dddfab8763f07f30549ce1cda0bae985581f063098\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-trlp-test-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"ce7d381faee9ff949d68d825ffa1dcb9247dad19667ec59a8e91847320dacbe0\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/e2e-unconfigured-facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"5d72fc7cc241ffd60d83142a900be014cc5d57320142e013493b21ecc86cb534\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-unconfigured-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"6565c4085b3917d5390fe1b0194fb3d8319f1d56b45867e3c68ff740b5c16ef3\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/echo-simulator-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.deny_all_by_default__6d45535f\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(!request.path.startsWith(\\\"/maas-api\\\") && !request.path.startsWith(\\\"/v1/models\\\") && !request.path.startsWith(\\\"/v1/subscriptions\\\") && !request.path.startsWith(\\\"/v1/api-keys\\\") && !(request.path == \\\"/v1/me\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_deny_all_by_default__6d45535f != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:openshift-ingress/gateway-default-deny\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"be1ccea8a4cc19c7190600de6631fcb661b63db81e2862348a6ef4f90bf33fa3\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/test/e2e-echo-model\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"8d8c8aae1332bb0300ac2d65be9b8708fbfde6d4b5599ec52380cf1f70956045\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/facebook-opt-125m-simulated-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_100_per_1m__cec148f9\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"3f98c74fda8361a9\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_100_per_1m__cec148f9 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-facebook-opt-125m-simulated\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"ca48ea5d9ee701ac5383800306378d945e66ca5427eba33396e6805ebbdc1ea7\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m\\\")\"]}}, {\"actions\":[{\"isGuard\":false, \"path\":\"kuadrant.internal.response.body\", \"predicate\":\"true\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"store\", \"value\":\"{\\\"model\\\": responseBodyJSON(\\\"/model\\\"), \\\"total_tokens\\\": responseBodyJSON([\\\"/usage/total_tokens\\\", \\\"/usageMetadata/totalTokenCount\\\", \\\"/response/usage/total_tokens\\\", \\\"/usage/totalTokens\\\"], \\\"number\\\")}\"}, {\"isGuard\":true, \"label\":\"auth\", \"messageBuilder\":\"envoy.service.auth.v3.CheckRequest {\\n attributes: envoy.service.auth.v3.AttributeContext {\\n request: envoy.service.auth.v3.AttributeContext.Request {\\n time: request.time,\\n http: envoy.service.auth.v3.AttributeContext.HttpRequest {\\n host: request.host,\\n method: request.method,\\n scheme: request.scheme,\\n path: request.path,\\n protocol: request.protocol,\\n headers: request.headers\\n }\\n },\\n destination: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: destination.address,\\n port_value: uint(destination.port)\\n }\\n }\\n },\\n source: envoy.service.auth.v3.AttributeContext.Peer {\\n address: envoy.config.core.v3.Address {\\n socket_address: envoy.config.core.v3.SocketAddress {\\n address: source.address,\\n port_value: uint(source.port)\\n }\\n }\\n },\\n context_extensions: {\\\"host\\\": \\\"f6df6bc14432fdc346191db86ee06e75c8090ed87a32c984493c837e97a10be6\\\"},\\n metadata_context: envoy.config.core.v3.Metadata{filter_metadata: {\\\"io.kuadrant.metrics.labels\\\": google.protobuf.Struct{fields: {\\\"cost_center\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"organization_id\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\\\\\"\\\\\\\"\\\"}}}}, \\\"subscription\\\": google.protobuf.Value{struct_value: google.protobuf.Struct{fields: {\\\"cel_expr\\\": google.protobuf.Value{string_value: \\\"auth.identity.selected_subscription\\\"}}}}}}}}\\n }\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: (auth_response.denied_response.status.code != 0) ? uint(auth_response.denied_response.status.code) : 403u, headers: auth_response.denied_response.headers, body: auth_response.denied_response.body}\", \"isGuard\":true, \"predicate\":\"has(auth_response.denied_response)\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"logMessage\":\"Unsupported field in OkHttpResponse\", \"predicate\":\"has(auth_response.ok_response) && (auth_response.ok_response.response_headers_to_add.size() > 0 || auth_response.ok_response.headers_to_remove.size() > 0 || auth_response.ok_response.query_parameters_to_set.size() > 0 || auth_response.ok_response.query_parameters_to_remove.size() > 0)\", \"terminal\":true, \"type\":\"fail\"}, {\"exportToHost\":true, \"isGuard\":true, \"path\":\"auth\", \"predicate\":\"has(auth_response.ok_response) && has(auth_response.dynamic_metadata)\", \"terminal\":false, \"type\":\"store\", \"value\":\"auth_response.dynamic_metadata\"}, {\"headers\":\"auth_response.ok_response.headers\", \"isGuard\":true, \"predicate\":\"has(auth_response.ok_response)\", \"target\":\"request\", \"terminal\":false, \"type\":\"headers\"}, {\"isGuard\":true, \"logMessage\":\"Auth response contained no http_response from auth_response\", \"predicate\":\"!has(auth_response.denied_response) && !has(auth_response.ok_response)\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"request.path != \\\"/maas-api/health\\\" || request.method != \\\"GET\\\"\", \"service\":\"auth-service\", \"sources\":[\"authpolicy.kuadrant.io:openshift-ingress/maas-gateway-auth\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"auth_response\"}, {\"isGuard\":true, \"label\":\"ratelimit_reserve\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.ReserveRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }] }],\\n amount: uint(0),\\n ttl: duration(\\\"0s\\\")\\n}\", \"onReply\":[{\"denyWith\":\"DenyResponse{status: 429u, headers: [[\\\"content-type\\\", \\\"application/json\\\"]], body: \\\"{\\\\\\\"error\\\\\\\": {\\\\\\\"message\\\\\\\": \\\\\\\"Too Many Requests\\\\\\\", \\\\\\\"type\\\\\\\": \\\\\\\"rate_limit_exceeded\\\\\\\", \\\\\\\"code\\\\\\\": 429}}\\\"}\", \"isGuard\":true, \"predicate\":\"reserve_response.code == 2\", \"terminal\":true, \"type\":\"deny\"}, {\"isGuard\":true, \"path\":\"kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13\", \"predicate\":\"reserve_response.code == 1 && has(reserve_response.reservation_id)\", \"terminal\":false, \"type\":\"store\", \"value\":\"reserve_response.reservation_id\"}, {\"isGuard\":true, \"logMessage\":\"Unknown reserve response code from reserve_response\", \"predicate\":\"reserve_response.code != 1 && reserve_response.code != 2\", \"terminal\":true, \"type\":\"fail\"}], \"predicate\":\"auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")\", \"service\":\"ratelimit-reserve-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"reserve_response\"}, {\"isGuard\":false, \"label\":\"ratelimit_commit\", \"messageBuilder\":\"kuadrant.service.ratelimit.v1.CommitRequest {\\n domain: \\\"llm/premium-simulated-simulated-premium-kserve-route\\\",\\n descriptors: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: ((auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) ? [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"tokenlimit.tokens_1000_per_1m__09f43f13\\\", value: string(1) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.selected_subscription_id\\\", value: string(auth.identity.selected_subscription_id) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"auth.identity.userid\\\", value: string(auth.identity.userid) }] : []) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor { entries: [envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"organization_id\\\", value: string(has(auth.identity.subscription_info.organizationId) ? auth.identity.subscription_info.organizationId : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"subscription\\\", value: string(auth.identity.selected_subscription) }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"cost_center\\\", value: string(has(auth.identity.subscription_info.costCenter) ? auth.identity.subscription_info.costCenter : \\\"\\\") }, envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry { key: \\\"model\\\", value: string(kuadrant.internal.response.body.model) }] }],\\n reservation_id: (kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) ? kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 : \\\"\\\",\\n actual_amount: ((kuadrant.internal.response.body.total_tokens) != null) ? uint(kuadrant.internal.response.body.total_tokens) : 0u\\n}\", \"onReply\":[{\"isGuard\":false, \"logMessage\":\"Reserve commit failed: invalid gRPC response\", \"predicate\":\"!has(commit_response.reservation_released)\", \"terminal\":false, \"type\":\"fail\"}], \"predicate\":\"(auth.identity.selected_subscription_id == \\\"793a52e02f7e18bf\\\" && !request.path.endsWith(\\\"/v1/models\\\")) && ((kuadrant.internal.tokenratelimit.reservation.tokenlimit_tokens_1000_per_1m__09f43f13 != null) || ((kuadrant.internal.response.body.total_tokens) != null))\", \"service\":\"ratelimit-commit-service\", \"sources\":[\"tokenratelimitpolicy.kuadrant.io:llm/maas-trlp-premium-simulated-simulated-premium\"], \"terminal\":false, \"type\":\"grpc\", \"var\":\"commit_response\"}], \"name\":\"fc54a1d4f18d4d59e58b6a3aa31dbfaddda2b89e5c28dc9eacf14ff38a414021\", \"routeRuleConditions\":{\"hostnames\":[\"*\"], \"predicates\":[\"request.url_path.startsWith(\\\"/\\\")\", \"request.headers.exists(h, h.lowerAscii() == \\\"x-gateway-model-name\\\" && request.headers[h] == \\\"publishers/llm/models/facebook/opt-125m-premium\\\")\"]}}], \"descriptorService\":\"kuadrant-operator-grpc\", \"services\":{\"auth-service\":{\"endpoint\":\"kuadrant-auth-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Check\", \"grpcService\":\"envoy.service.auth.v3.Authorization\", \"timeout\":\"2s\", \"type\":\"dynamic\"}, \"ratelimit-check-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"CheckRateLimit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-commit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Commit\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-report-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"deny\", \"grpcMethod\":\"Report\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-reserve-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"Reserve\", \"grpcService\":\"kuadrant.service.ratelimit.v1.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}, \"ratelimit-service\":{\"endpoint\":\"kuadrant-ratelimit-service\", \"failureMode\":\"allow\", \"grpcMethod\":\"ShouldRateLimit\", \"grpcService\":\"envoy.service.ratelimit.v3.RateLimitService\", \"timeout\":\"100ms\", \"type\":\"dynamic\"}}}"},"failure_policy":"FAIL_RELOAD","name":"kuadrant-wasm-shim","root_id":"kuadrant_wasm_shim","vm_config":{"allow_precompiled":true,"code":{"remote":{"http_uri":{"cluster":"kuadrant-operator-wasm","timeout":"10s","uri":"http://kuadrant-operator-wasm.kuadrant-system.svc.cluster.local:8082/plugin.wasm"},"sha256":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}},"runtime":"envoy.wasm.runtime.v8","vm_id":"fd5039db79d000f31669de1fde37ea175d3ad05f2b14341d6936fb564cab5553"}}}}}}},{"applyTo":"CLUSTER","match":{"cluster":{"service":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local"}},"patch":{"operation":"ADD","value":{"connect_timeout":"1s","http2_protocol_options":{},"lb_policy":"ROUND_ROBIN","load_assignment":{"cluster_name":"kuadrant-operator-wasm","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"address":"kuadrant-operator-wasm.kuadrant-system.svc.cluster.local","port_value":8082}}}}]}]},"name":"kuadrant-operator-wasm","type":"STRICT_DNS"}}}],"workloadSelector":{"labels":{"gateway.networking.k8s.io/gateway-name":"maas-default-gateway"}}},"status":{}},"error":"etcdserver: request is too large"} {"level":"info","ts":"2026-10-29T22:16:46.852Z","logger":"kuadrant-operator.ReconciliationErrorHandler","msg":"scheduling retry for non-blocking errors","errorCount":1,"requeueAfter":16} {"level":"info","ts":"2026-10-29T22:16:47.919Z","logger":"kuadrant-operator.event logger","msg":"new events","resources":["ConfigMap"],"eventTypes":{"update":1}} {"level":"info","ts":"2026-10-29T22:16:47.942Z","logger":"kuadrant-operator.PersistentErrorTracker","msg":"non-blocking error resolved","key":"EnvoyFilter.networking.istio.io/openshift-ingress/kuadrant-maas-default-gateway/update","attempts":4,"duration":6.73153982} {"level":"info","ts":"2026-10-29T22:17:02.852Z","logger":"kuadrant-operator.KuadrantController","msg":"triggering reconciliation retry for non-blocking errors","errorCount":0}